Topic: tableGrid color
how to change group color?
My Visual Database → General → tableGrid color
how to change group color?
Set property HeaderStyle = hsFlatBorder and use this code:
procedure frmMain_TableGrid1_OnChange (Sender: TObject);
begin
frmMain.TableGrid1.Columns[0].Header.Color := clRed;
end;
You can change only header background color, header font color = table font color
I need to paint the row according to the selected group
Hello amir-t
Can this snippet help you ?
procedure Form1_GridEmployees_OnChange (Sender: string);
var i,c: integer;
k, q: integer;
begin
// Form1.GridEmployees.Columns[3].Visible := False; // hide column
c := Form1.GridEmployees.RowCount - 1;
q := Form1.GridEmployees.Columns.Count - 1;
for i := 0 to c do
begin
if Form1.GridEmployees.Cells[3,i] = 'Yes' then
for k := 0 to q do Form1.GridEmployees.Cell[k,i].Color := clRed;
if Form1.GridEmployees.Cells[3,i] = 'No' then
for k := 0 to q do Form1.GridEmployees.Cell[k,i].Color := clGreen;
end;
end;
JB
My Visual Database → General → tableGrid color
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi