当前位置:网站首页>Delphi implements adding a column of serial number to the CXGRID list

Delphi implements adding a column of serial number to the CXGRID list

2022-06-13 01:43:00 Guoguo

stay Cxgrid There is OnGetDisplayText() event , This time can be completed in Cxgrid Add a column number to the table , The sequence number in this column will not change according to the sorting change .


procedure TForm1.cxGrid1DBTableView1Column1GetDisplayText(

     Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;

 var AText: string);

begin

atext:=inttostr(arecord.Index);

end;


stay Cxgrid There is OnGetDataText() event , This time can be completed in Cxgrid Add a column number to the table , The sequence number of this column will change according to the sorting change


procedure TForm1.cxGrid1DBTableView1Column1GetDataText(

 Sender: TcxCustomGridTableItem; ARecordIndex: Integer; var AText: string);

begin

atext:=inttostr(arecord.Index);

end;

原网站

版权声明
本文为[Guoguo]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280551009970.html