+ -
当前位置:首页 → 问答吧 → 请问TMS的DBAdvGrid怎样设置编号呢?

请问TMS的DBAdvGrid怎样设置编号呢?

时间:2011-12-07

来源:互联网

DBAdvGrid1.AutoNumberCol(0);无效啊

作者: life923   发布时间: 2011-12-07

关注啊
我刚用TMS,目前就用到了类似office风格的菜单

作者: jubobo   发布时间: 2011-12-08

DBGridEh1设置编号,在DrawColumnCell

可DBAdvGrid1的DrawCell设置 不行
procedure TForm1.DBAdvGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
begin
if ACol = 0 then
with DBAdvGrid1.Canvas do
begin
FillRect(Rect);
TextOut(Rect.Left+2, Rect.Top+2,IntToStr(DBAdvGrid1.DataSource.DataSet.RecNo));
end;  
end;

这样值都是1 DataSet不会动

作者: life923   发布时间: 2011-12-08

热门下载

更多