DBAdvGrid checkbox column problem

I have an integer field (TinyInt in the database) that should get 0 or 1.
I created a column with:

  AColumn.CheckBoxField := True;
  AColumn.CheckFalse := '0';
  AColumn.CheckTrue := '1';

It works well while editing and posting. The value 0 or 1 is correctly persisted to the database depending on the checkbox state; but when I open the form again, the checkboxes are always blank. All other fields load and display well.

Checkboxes "blank" means unchecked or that checkboxes do not appear at all?


This is strange. When you check via this field's OnGetText event, is it returning either '0' or '1'?

It's a dynamic field created by Aurelius on a completely empty AureliusDataSet. I don't have an OnGetText event assigned, but checking through it, the Text parameter always comes as an empty string, but the Fields's ToString method does return '0' or '1' .

It uses field.DisplayText to compare with CHECKTRUE, so please implement OnGetText to return either a '1' or '0'

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.