Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 11:28

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 06 Dec 2019, 18:45 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Is there a possibility to put a column set as "checkbox" so that if the value on field its null the checkbox will be like this Image
instead of like this? Image


Top
 Profile  
 
PostPosted: 06 Dec 2019, 19:09 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

You can use TColumnEh.OnGetCallParams event to set CheckboxState before cell is drawn
like this:

Code:
procedure TForm1.DBGridEh1Columns7GetCellParams(Sender: TObject;
  EditMode: Boolean; Params: TColCellParamsEh);
begin
  if (Params.CheckboxState = TCheckBoxState.cbGrayed) then
    Params.CheckboxState := TCheckBoxState.cbUnchecked;
end;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 06 Dec 2019, 19:26 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group