Thank you @ErelB4X:Dim c As B4XTableColumn = B4XTable1.GetColumn(ColumnId) Dim index As Int = B4XTable1.Columns.IndexOf(c)
If all your columns have the same name then perhaps you should consider using the CustomListView rather than a table.But index in your code always returns 0 for my table
My table snapshot is attached
![]()
B4XTable1.AddColumn("Name",B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Name",B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Name",B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Name1",B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Name2",B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Name3",B4XTable1.COLUMN_TYPE_TEXT)
It can has more columns with the same titleYou cannot have the same title for each column in B4XTable for it to work properly. It uses an in-memory SQLite database where you cannot have 2 identical column names.
B4XTable1.AddColumn("Name1",B4XTable1.COLUMN_TYPE_TEXT).Title = "Name"
B4XTable1.AddColumn("Name2",B4XTable1.COLUMN_TYPE_TEXT).Title = "Name"
B4XTable1.AddColumn("Name3",B4XTable1.COLUMN_TYPE_TEXT).Title = "Name"