Add a column of record number to uniGUI’s table control uniDBGrid

uniDBGrid is still very convenient to use, but it does not have the function of displaying the record number, so you must add it yourself. Refer to the solution given by foreigners as follows:
plan 1:
1- Create a first column in UniDBGrid (the column name starts with “NO”)
2- Add the following code under the UniDBGrid event DrawColumnCell
procedure ….Form.UniDBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
vDbGrid: TDBGrid absolute Sender;
begin
if DataCol=0 then
vDbGrid.Canvas.TextOut(Rect.Left + 2
, Rect.Top + 2
, IntToStr(vDbGrid.DataSource.DataSet.RecNo));
end;
Scenario 2:
Add the following code under the ExtEvents event of UniDBGrid:
sender.headerCt.insert(0,new Ext.grid.RowNumberer({text:”,width:’auto’,align:’center’,menuDisabled:false}));

Below is the rendering
