Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling editing for TStringGrid

I am making a simple database application by following this video. My problem occurs when I use a TStringGrid instead of a TGrid as stated the video because I don't have it. I have a Navigator and all of my data loaded into the TStringGrid, but I am unable to edit it at all. So far I've tried double clicking an entry, pressing F2 and clicking on the Edit button on the Navigator, but nothing is working.

Is there anything I need to alter in the properties of the TStringGrid to allow editing or is the purpose of it only to display data?

Thank you in advanced!

like image 899
ple103 Avatar asked Oct 20 '25 13:10

ple103


1 Answers

You need to add goEditing to the Options property. Include it in the Object Inspector, or in code:

StringGrid1.Options := StringGrid1.Options + [goEditing];
like image 157
David Heffernan Avatar answered Oct 22 '25 03:10

David Heffernan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!