'define the column
Dim LNColumn As B4XTableColumn
LNColumn = B4XTable1.AddColumn("Nr", B4XTable1.COLUMN_TYPE_VOID)
LNColumn.Width = 40dip
'numbering part
Sub B4xTable1_DataUpdated
'partially taken from Erels Example of having custom columns
Dim iNr As Int = B4XTable1.RowsPerPage * (B4XTable1.CurrentPage - 1) + 1
For i = 0 To B4XTable1.VisibleRowIds.Size - 1
Dim RowId As Long = B4XTable1.VisibleRowIds.Get(i)
Dim lbl As B4XView = LNColumn.CellsLayouts.Get(i + 1)
Dim slbl As Label = lbl.GetView(0) 'ImageView will be the 2nd child of the panel. The built-in label is the first.
If RowId > 0 Then 'if you take this out it is numbering all rows down even if there is no data
slbl.Text = iNr
End If
iNr = iNr + 1
Next
End Sub