Topic: Tablegrid
Есть такой скрипт но не работает.
procedure lethal (Sender: string; var Cancel: boolean);
var
i, c: integer;
begin
c := Base.TableGrid1.RowCount - 1;
for i := 0 to c do
begin
if SQLExecute('Select lethal from Base where id='+Base.TableGrid1.sqlValue)>0 then
begin
Base.TableGrid1.Cell[1,i].Color := clRed;
end;
end;
end;
Надо украсить вторую колонку TableGrid1 в красный если lethal (Да/Нет) в Base больше нуля или конкретно 1.
Помогите пожалуйста.