Search code examples
delphidbgrid

Setting Default Value "0" on Checkbox Field of DBGridEh


I wonder if DBGridEh Checkbox has property to set the value initially by 0 (set already in KeyList 0 and 1)?

Otherwise, which event could handle this in the ClientDataSet before adding new record?

I tried some events both on the CDS and CDS.CheckBoxColumn level but no avail. It throws some errors.

By the way, DBGrid is the predecessor of DBGridEh.


Solution

  • Initializing the field values of a new record in any TDataSet is done in the OnNewRecord event.