TDBAdvGrid - color some rows

Good morning,

I want to color some rows depending the content of the records.
If I use standard Embarcadero TDBGrid the event OnDrawDataCell solve my problem.

With TDBAdvGrid there is the same feature?

thank you L.

Please have a look at the demo in the ADOSelColor folder in the TDBAdvGrid samples distribution that shows exactly how this is done.

Ok. Thank you.
I see this demo but my problem is to check some fields that they aren't shown in grid.
There is another way?
thank you
L.

For selection of rows, did you see the demo ADOSelection ?

I see.
My problem is: I want to check a field then is not listed in grid.

I change some code of ADOSelection: <  if MyTable.MyField.Value = 'OK' then >

If I use this syntax is not working.

procedure TForm1.DBAdvGrid1GetCellColor(Sender: TObject; ARow,
  ACol: Integer; AState: TGridDrawState; ABrush: TBrush; AFont: TFont);
var
  state: boolean;
begin
  if MyTable.MyField.Value = 'OK' then
  begin
    if state then
    begin
      ABrush.Color := clRed;
      AFont.Color := clWhite;
      AFont.Style := [fsBold];
    end
    else
    begin
      ABrush.Color := clWindow;
      AFont.Color := clWindowText;
      AFont.Style := [];
    end;
  end;
end;

Please take the value from grid.Cells[col,row] as data for your condition.
If this value shouldn't be visible in the grid, set this data in a hidden column and you can still access grid.Cells[col,row]

Ok.
Now works using Hiddencolumn.
The problem was: I defined a column with CheckBoxField enabled and I was unable to check the value of this kind of column.