TDBGrid Checkbox column allowing only one record to be checked lazarus / 16-Databases ---------------------------------------------------------------------- RedOctober · 2019-12-22 22:02 Platform:  FPC 3.0.4  Lazarus 1.8.4, OS:  Windows Server 2016 Goal:  In a TDBGrid that is displaying data from a Firebird 3x table in the rows, I want each row to have a check box as the first column.  I want all check boxes to be unchecked to start with, and then I want the user to be able to check many, one or none, of the check boxes. Progress:  I have successfully made a CheckBox column, the user can put a check in the check box of a cell Snag:  No matter how I work this, only one check box can be checked at a time.  I can check the first check box, but when I check another check box, all other check boxes, including the one I just checked, reverts to either null (grayed with check) or is unchecked.   I want my user to be able to check multiple check boxes (one in each row).  How is this accomplished?  Is there a setting I am missing here? ~~~~~~~~~~~~~~ Tried:    Making the check box column a calculated field.  (same unwanted behavior)   Making a "virtual" field in the SQL that fetches the data  (same unwanted behavior) ---------------------------------------------------------------------- valdir.marcos · 2019-12-23 18:24 Quote from: RedOctober on December 22, 2019, 11:02:48 pmPlatform:  FPC 3.0.4  Lazarus 1.8.4, OS:  Windows Server 2016 Goal:  In a TDBGrid that is displaying data from a Firebird 3x table in the rows, I want each row to have a check box as the first column.  I want all check boxes to be unchecked to start with, and then I want the user to be able to check many, one or none, of the check boxes. Progress:  I have successfully made a CheckBox column, the user can put a check in the check box of a cell Snag:  No matter how I work this, only one check box can be checked at a time.  I can check the first check box, but when I check another check box, all other check boxes, including the one I just checked, reverts to either null (grayed with check) or is unchecked.   I want my user to be able to check multiple check boxes (one in each row).  How is this accomplished?  Is there a setting I am missing here? ~~~~~~~~~~~~~~ Tried:    Making the check box column a calculated field.  (same unwanted behavior)   Making a "virtual" field in the SQL that fetches the data  (same unwanted behavior)Are using the proprieties "ValueChecked" and "ValueUnchecked" on the Lazarus DBGrid field information? ---------------------------------------------------------------------- RedOctober · 2019-12-23 23:30 I found the answer at:  https://wiki.freepascal.org/Grids_Reference_Page#Selecting_Records_in_ a_DBGrid_using_checkboxes Scroll way down toward the bottom, section title:  "Selecting Records in a DBGrid using checkboxes"