Hi!
I have a poblem with row colors in the TWebDbGrid component. Right after dataset opening the colors are not applied to rows. After tapping any row (I run the app on a tablet)., the colors reappear. I've made a small video, because describing it is very difficult (it's in the ZIP file because attachment restrictions):
IMG_7547.zip (512.4 KB)
I treid to use all of this:
- grid.Update
- grid.Hide+Show combination.
- grid.Row := 0
- grid.SetFocus
The code for getting the data:
wdsPotPodrobno.Close;
wdsPotPodrobno.QueryString := Qry;
wdsPotPodrobno.Load;
After this all the rows are white, but should be white or green depending on a field value. After a tap it's immediately displayed correctly.
The code for row coloring (datToday is defined just once on form creation):
procedure TfrmLokacija.gridViewGetCellClass(Sender: TObject; ACol, ARow: Integer; AField: TField; AValue: string; var AClassName: string);
var
datRow: string;
begin
datRow := gridView.Cells[2,ARow];
if datRow >= datToday then begin
AClassName := 'done';
end;
end;
I would kindly ask for any suggestion, because I'm out of ideas