I use an ObjectList<Person>
and use it with the GridGetValue()
method. My person class contains name and gender , where gender is the value. Which is invisible in the grid.
Method:
procedure TForm1.PersonGridGetValue(Sender: TObject; const Col, Row: Integer; var Value:TValue);
begin
if Col = 0 then
Value := PersonRecord.PersonList.Items[Row].name;
end;
How can I set the background color of a row based on a value from my object list?