dynamically change the color of row in a DBGrid:
(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn;
if Table1.FieldByName('Salary').AsCurrency>36000 then
(Rect, DataCol, Column, State);
If an employee's salary is greater than 36 thousand, its row is displayed in White.