Sorry for my English. I have some table (from datasource->mssql server->views), and i need to delete/hide/assign text color= white/any other things for clicked cells in DBGrid. Like: i clicked cells->cells font=white(or clicked .text:=''/etc..);save;clicked next cells; repeat. I try do like this:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if gdSelected in State
then begin
with DBGrid1.Canvas do
begin
Brush.Color:=clWhite;
Font.Color:=clWhite;
FillRect(Rect);
end;
end;
end;
But it works for only 1 cell: when i click next cells the color becomes standart (like in another cells in DBGrid) for the previous cell. How i can save cell color for all clicked cells? //Complicated by the fact that I do not know much about Delphi Thanks!
i need to delete/hide/assign
? what you want to achieve`? – Ilyes