Jump to content

UniDBGrid GridEditor add checkbox non Boolean field


morphine

Recommended Posts

Hello All,
 
Please could you advice me on how to add a checkbox to a DBgrid? The field is not Boolean. I have tried the following :
 
procedure TfrmTest.Test1GetText(Sender: TField;
 var Text: string; DisplayText: Boolean);
begin
 
if Sender.AsInteger =1 then Text :='<input type = "checkbox" value ="1" checked > ';
if Sender.AsInteger =0 then Text :='<input type = "checkbox" value ="0" > ';
 
Is there a better way of doing it without using HTML?

 

Thanks.

Link to comment
Share on other sites

×
×
  • Create New...