Android Question How do I hide a column in B4XTable ?

vmag

Active Member
Hello! I found a way to hide some columns using VisibleColumns on the b4XTable forum, but I haven't been able to use it, for example, after creating a table, how do I hide the ID column ?
B4X:
B4XTable1.AddColumn("ID", B4XTable1.COLUMN_TYPE_NUMBERS)
B4XTable1.AddColumn("Name", B4XTable1.COLUMN_TYPE_TEXT)
Dim data As List
data.Initialize
data.Add(Array(1, "Name1"))
data.Add(Array(2, "Name2"))
data.Add(Array(3, "Name3"))
B4XTable1.SetData(data)
What do I need to set in the operator B4XTable1.VisibleColumns() to hide the ID column ?
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

vmag

Active Member
Thank you, here I am slow-witted, I studied this example and did not notice...
B4X:
B4XTable1.VisibleColumns.RemoveAt(B4XTable1.VisibleColumns.IndexOf(NumberColumn))
B4XTable1.VisibleColumns.InsertAt(1, NumberColumn)
B4XTable1.Refresh
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…