procedure ttt.GridDGDrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
begin
if column=Griddg.Columns[5] then Griddg.Canvas.TextOut(Rect.left, Rect.top, '555')
else exit;
end;
不要单步调试,这样不一定行,可能要重载
DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
begin
if column=Griddg.Columns[5] then Griddg.Canvas.TextOut(Rect.left, Rect.top, '555')
else exit;
end;
不要单步调试,这样不一定行,可能要重载
DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
begin
if column=Griddg.Columns[5] then Griddg.Canvas.TextOut(Rect.left, Rect.top, '555');
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
//加上这句;
end;
好象有问题
试试
if column=5 then