i need to use dgRowSelect
however you do not have the focu with the selection when using the following code.
I can't focus the Grid and see the selected line when I use the "OnDrawColumnCell" event see this example in Attachment.
Code:
procedure TForm1.GridDadosDrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
Var Value: String;
begin
Value := GridDados.DataSource.DataSet.FieldByName('CODIGO').Asstring;
if (Value = '6') Or (Value = '9') then begin
GridDados.Canvas.Font.Style := [fsBold];
GridDados.Canvas.Font.Color := ClBlue;
end;
GridDados.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
This link has an example.
https://mega.nz/#!Ymhk2IzY!0wP5j6F14dHlzjDXXz6lKgMeM2nr5Ykelv8Ycd2-GQIAnother thing I would like to use Delphi's TDBGrid and cast to TDbGridEh I will have to do this because I will use the same project using Copying Directives for the same application I will have it in VCL and WEB using Unigui so I will control by copying directives.
So in order to leave TDbGrid and cast I am having problems with the "Expanded" property that exists in TDbGrid I tried to make this code below and couldn't see it:
Code:
Type
TLFColumn = Class(DBGridEh.TDBGridColumnEh)
Private
FExpanded: Boolean;
published
property Expanded: Boolean read FExpanded write FExpanded;
End;
Type
TDBGrid = Class(DBGridEh.TDBGridEh)
Private
LFColumn: TLFColumn;
published
property Columns: TLFColumn read LFColumn write LFColumn;
End;