For always visible checkboxes please use grid.AddCheckBox() or grid.AddCheckBoxColumn(). This also applies to TAdvColumnGrid (which descends from TAdvStringGrid)
We could reproduce this and we're investigating.
Meanwhile as a workaround & alternative to using bands, implement grid.OnGetCellColor with something like:
The last parameter of the AddCheckBox() method determines if the checkbox state is related to a cell value of CheckTrue/CheckFalse or not.
Described in manual http://www.tmssoftware.biz/download/manuals/TMS%20TAdvStringGrid%20Developers%20Guide.pdf
Hi,
I appreciate this is an old post, but I found it when trying to find out why setting CheckFalse / CheckTrue values in the TGridColumnProperties don't work.
If we rely on the TGridColumnProperties to edit the cell as a checkbox, that editor always appears to set Y or N, it does not appear to set the text we have stipulated in CheckFalse / CheckTrue.
It would be useful to have the invoked editor set the value to the values of CheckFalse / CheckTrue provided at least one of them is set to a non-zero length string. (So one of them could be as showing a blank cell could be appropriate).
Thanks for your fantastic components, and for considering this request.
I retested this here with a default TAdvColumnGrid and the code:
procedure TForm1.Button1Click(Sender: TObject);
begin
listbox1.Items.Add(AdvColumnGrid1.Cells[1,1]);
listbox1.Items.Add(AdvColumnGrid1.Cells[2,1]);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
advcolumngrid1.Columns[1].CheckFalse := '0';
advcolumngrid1.Columns[1].CheckTrue := '1';
advcolumngrid1.Columns[2].CheckFalse := 'F';
advcolumngrid1.Columns[2].CheckTrue := 'Y';
advcolumngrid1.AddCheckBox(1,1,false,true);
advcolumngrid1.AddCheckBox(2,1,false,true);
end;
When clicking the checkbox in column 1, this results in value 0 or 1 in the cell and for column 2 in value N or Y, which is the expected behavior.