Hello
Unfortunately, there is no way in the grid to show or not show a certain CellButton depending on the values of the record.
You can achieve a similar effect through LaObjects by specifying the desired LaControlTemplate in the TColumnEh.OnGetLaControlTemplate event.
Code:
procedure TfrEhLibForum.GetForumNameTemplate(Grid: TCustomDBGridEh; Params: TDBGridGetLaControlTemplateEventParamsEh);
begin
if (MemTableEh1.FieldByName('forum_flags').AsString = '32') then
Params.LaControlTemplate := FrmListGroupLaControl
else
Params.LaControlTemplate := FrmListItemLaControl;
end;
For an example of using the OnGetLaControlTemplate event, see the Demo project Demos\LaObjects.MainDemo\
unit Frame4EhLibForum