Topic: tGrid Column color and ...
I have tried to apply Dmitry's striped tGrid row coloring script to specified single column coloring but I couldn't get it work?
In this case I just want to color specified single column cells without striped coloring.
With the following script I'm getting "List index out of bounds" error.
procedure FORM2_TableGrid2_OnChange (Sender: string);
var iRow, c, q, iCol: integer;
begin
c := FORM2.TableGrid2.RowCount - 1;
q := FORM2.TableGrid2.Columns.Count - 1;
for iCol := 0 to c do
for iRow := 0 to q do
begin
if iCol mod 2 = 0 then FORM2.TableGrid2.Cell[iCol,iRow].Color := clYellow;
end;
end;
Is it possible to get date field displayed without data when there is non entered (not checked)?
Unless I'm doing something wrong, when is not checked and entered data to date field it displayes current date.
procedure Form2_TableGrid1_OnCellClick (Sender: string; ACol, ARow: Integer);
var s: string;
begin
s := SQLExecute('SELECT birthDate FROM People WHERE id='+Form2.TableGrid1.sqlValue);
if s <> '' then Form2.dtpMainPeopleDOB.Date := SQLDateTimeToDateTime (s)
else Form2.dtpMainPeopleDOB.Checked := False;
//if Form2.dtpMainPeopleDOB.Checked = False then Form2.dtpMainPeopleDOB.sqlDate := ('');
end;
In an attempt to clear date value from it my script line which is commented out as it doesn't work..
God... please help me become the person my dog thinks I am.