Set dgRowSelect to True, in option.
// OnDrawColumnCell event of DBGrid1
if ((State = [gdSelected]) or (State=[gdSelected,gdFocused])) then
begin
DBGrid1.Canvas.Font.Color :=ClYellow;
DBGrid1 .Canvas.Brush.Color :=clblue; //Key
DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
DBGrid1.Canvas.Font.Color :=ClYellow;//Font color, you can change it to what you want DBGrid1.Canvas.Brush.Color :=clblue; //The background color can be changed to what you want
// OnDrawColumnCell event of DBGrid1
if ((State = [gdSelected]) or (State=[gdSelected,gdFocused])) then
begin
DBGrid1.Canvas.Font.Color :=ClYellow;
DBGrid1 .Canvas.Brush.Color :=clblue; //Key
DBGrid1.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;
DBGrid1.Canvas.Font.Color :=ClYellow;//Font color, you can change it to what you want DBGrid1.Canvas.Brush.Color :=clblue; //The background color can be changed to what you want