with (Sender as TDBAdvGrid) do if Cells[12,ARow] = '0' then If (ARow>0) then ABrush.Color:= clYellow else ABrush.Color:= clwhite;