W
wangchengwu
Unregistered / Unconfirmed
GUEST, unregistred user!
又是DBGrid,为什么不会输出当前记录数?
代码如下:
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);
begin
if field=adoquery1.FieldByName('xuhao') then
dbgrid1.Canvas.TextOut(rect.Left,rect.Top,inttostradoquery1.RecNo));
end;
代码如下:
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);
begin
if field=adoquery1.FieldByName('xuhao') then
dbgrid1.Canvas.TextOut(rect.Left,rect.Top,inttostradoquery1.RecNo));
end;