ChickenStrip996
ChickenStrip996

Reputation: 1

RAD Studio XE2 & Firemonkey - Accessing data in cell of TStringGrid

I have just purchased XE2 and getting to grips with iOS development (I think!!).

I have however failed to see how you can obtain a value from a cell in the XE2 Firemonkey implementation of the TStringGrid which is different from the VCL implementation.

I can populate it with values from a SQL Lite database but cannot see how I can get the value from a cell when selected. I have not used LiveBindings at all at this stage to get the values into the TStringGrid which I understand is the 'new' way forward.

Any help would be greatly appreciated.

Thank you

Upvotes: 0

Views: 1615

Answers (1)

Arjen van der Spek
Arjen van der Spek

Reputation: 2660

Value of a cell:

  ShowMessage(StringGrid1.Cells[StringGrid1.ColumnIndex, StringGrid1.Selected]);

An example how to use LiveBindings and a StringGrid can you find here (use in Delphi 'File' / 'Open from version control ...'): https://radstudiodemos.svn.sourceforge.net/svnroot/radstudiodemos/branches/RadStudio_XE2/LiveBindings/bindgridlink/fmx

Upvotes: 2

Related Questions