Текущий архив: 2006.09.10;
Скачать: CL | DM;
ВнизЗакрасить определённую строчку в DBGridEh ? Найти похожие ветки
← →
Хой (2006-07-06 09:58) [0]Как закрасить определённую строчку в компоненте DBGridEh в зависимости от значения определёного поля ?
← →
имя (2006-07-06 10:02) [1]Удалено модератором
← →
_RusLAN © (2006-07-06 10:06) [2]IMHO в OnGetCellParams будет удобней. Там есть параметр Background:TColor
← →
Ega23 © (2006-07-06 10:20) [3]
procedure TFClassConfig.dbgCOMUnitsGetCellParams(Sender: TObject;
Column: TColumnEh; AFont: TFont; var Background: TColor;
State: TGridDrawState);
var
ds:TDataSet;
begin
if not (Sender is TDBGridEh) then Exit;
ds:=TDBGridEh(Sender).DataSource.DataSet;
if ds.IsEmpty then Exit;
if ANSIUpperCase(Column.FieldName)="COMMSKSTR" then
begin
if ds.FieldByName("COMMsk").AsInteger=0 then
AFont.Color:=clRed
else
AFont.Color:=clBlue;
end;
if ANSIUpperCase(Column.FieldName)="COMTYPNAM" then
begin
Case ds.FieldByName("COMTypCod").AsInteger of
10 : AFont.Color:=clGreen;
20 : AFont.Color:=clAqua;
30 : AFont.Color:=clBlue;
else AFont.Color:=clGray;
end;
end;
end;
Страницы: 1 вся ветка
Текущий архив: 2006.09.10;
Скачать: CL | DM;
Память: 0.45 MB
Время: 0.042 c