hr_110
یک شنبه 01 آذر 1383, 23:46 عصر
چطوری میشه رنگ بعضی از سطرهای DBGrid رو عوض کرد؟
علی کشاورز
دوشنبه 02 آذر 1383, 03:53 صبح
باید در رویداد OnDrawColumnCell کدی شبیه به این بنوسید:
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if {some conditions} then
DBGrid1.Canvas.Brush.Color := clRed; //or any other colors
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
vBulletin® v4.0.8, Copyright ©2000-1391, Jelsoft Enterprises Ltd.