Jump to content


Photo

Setting whole row read-only?


  • Please log in to reply
1 reply to this topic

#1 littlebigfred

littlebigfred
  • Members
  • 176 posts

Posted 06 October 2009 - 06:17 PM

Hello

I need to make some rows read-only. Currently, when the user double-clicks on a cell, I need to check its row index to allow/disallow editing.

To simplify the code, Is there a way to tell NextGrid that a whole row is read-only?

CODE
With NextGrid1 do begin
  //N.A.
  Row[LastAddedRow].ReadOnly := True;
end;


Thank you.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,194 posts
  • Gender:Male

Posted 06 October 2009 - 08:45 PM

Hello Fred,

Only solution is to use OnBeforeEdit event. In this event you will check ARow parameter and then set Accept parameter to True or False.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users