DelphiFAQ Home Search:

Setting read-only columns in StringGrid

 

comments4 comments. Current rating: 5 stars (2 votes). Leave comments and/ or rate it.

From: Mark Pritchard
In the OnSelectCell event, this works fine (every even column is editable)

if Col mod 2 = 0 then
  grd.Options := grd.Options + [goEditing]
else
  grd.Options := grd.Options - [goEditing];

Comments:

2006-07-05, 10:22:39
anonymous from Turkey  
rating
2006-07-22, 23:33:06
anonymous from Australia  
rating
Col should be ACol?
2006-10-07, 05:00:31
anonymous from Switzerland  
Yes, ACol returns the column index.
2008-06-01, 03:12:30
Drone from Azerbaijan  
what's the point? You can just set CanSelect on True or False

 

 

Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option.
 
It seems that you are
from Los Angeles, US .

Info/ Feedback on this

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:
photo Add a picture:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity. The owner of this web site reserves the right to delete such material.