Search code examples
delphicheckboxfiremonkeytstringgrid

Add checkbox in stringgrid Delphi FMX


for an app, I have a stringgrid with objects. now it is the intention that the objects are selected in the string grid by means of the checkbox. so for every row, there must be a column with a checkbox. what is the best way for this on an FMX platform? Or is there a way you can add a column in the SQL database with checkboxes?


Solution

  • I solved the problem and did it like this. First, I added a column in SQL with a bit value. In Delphi a linked it to a memtable with the boolean value. Now I bind the string grid visually to the memtable so the string grid filled with the SQL data. when you right-click on string grid you see 'columns editor..' click on that and you see the columns from the SQL. now click on the boolean column and change the column type to Tcheckcolumn.