Other fields that you can change are: Id, Searchable, Formatter, LabelIndex and DisableAutoResizeLayout. Not all of them will be covered in this tutorial.
You can also call GetColumn with the column id to get a column type. The id equals to the title by default (can be changed).
Q2: After I have set the column id, can I use it with PreferenceDialog?
Eg: I have the title as "Birth Date" and key as "BirthDate" for PreferenceDialog json file, for B4XTable I have column header as "Birth Date" but I set the column id as "BirthDate" ?
B4XTable is a paged based table. The UI is made of a horizontal xCLV. The data is stored in an in-memory SQLite database. How to use? 1. Add a B4XTable with the designer. 2. Add the columns: B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS) B4XTable1.AddColumn("Name"...
This example demonstrates several things: Cross platform code and files, similar to the way XUI2D games are organized: All the logic is implemented in a class named EditableTable. The module is located in the projects parent folder. The two asset files (list of animals - source; and the...
Q2: After I have set the column id, can I use it with PreferenceDialog?
Eg: I have the title as "Birth Date" and key as "BirthDate" for PreferenceDialog json file, for B4XTable I have column header as "Birth Date" but I set the column id as "BirthDate" ?
B4XTable is a paged based table. The UI is made of a horizontal xCLV. The data is stored in an in-memory SQLite database. How to use? 1. Add a B4XTable with the designer. 2. Add the columns: B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS) B4XTable1.AddColumn("Name"...
This example demonstrates several things: Cross platform code and files, similar to the way XUI2D games are organized: All the logic is implemented in a class named EditableTable. The module is located in the projects parent folder. The two asset files (list of animals - source; and the...
A1. Dim Col as B4xTableColumn
Col = B4xTable1.AddColumn("Title", B4xTable1.COLUMN_TYPE...)
Col.id = "YourId"
A2. I don't think it is relation with column id
Q2: After I have set the column id, can I use it with PreferenceDialog?
Eg: I have the title as "Birth Date" and key as "BirthDate" for PreferenceDialog json file, for B4XTable I have column header as "Birth Date" but I set the column id as "BirthDate" ?
B4XTable is a paged based table. The UI is made of a horizontal xCLV. The data is stored in an in-memory SQLite database. How to use? 1. Add a B4XTable with the designer. 2. Add the columns: B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS) B4XTable1.AddColumn("Name"...
This example demonstrates several things: Cross platform code and files, similar to the way XUI2D games are organized: All the logic is implemented in a class named EditableTable. The module is located in the projects parent folder. The two asset files (list of animals - source; and the...
A1. Dim Col as B4xTableColumn
Col = B4xTable1.AddColumn("Title", B4xTable1.COLUMN_TYPE...)
Col.id = "YourId"
A2. I don't think it is relation with column id
When I click Edit, I pass the data as a Map.
This Map has the key which is default to B4XTable header.
The problem I am facing when I use Localizator, the key header has changed to different language.
So I need a standard key disregard of different language.
When I click Edit, I pass the data as a Map.
This Map has the key which is default to B4XTable header.
The problem I am facing when I use Localizator, the key header has changed to different language.
So I need a standard key disregard of different language.
Select Main.SYSTEM_LANGUAGE.ToUpperCase
Case "ZH-CN"
Dim JsonString As String = File.ReadString(File.DirAssets, "template_staff_zh-cn.json")
Case "ZH-TW"
Dim JsonString As String = File.ReadString(File.DirAssets, "template_staff_zh-tw.json")
Case Else
Dim JsonString As String = File.ReadString(File.DirAssets, "template_staff_en.json")
End Select
PrefDialog2.LoadFromJson(JsonString)
When I click Edit, I pass the data as a Map.
This Map has the key which is default to B4XTable header.
The problem I am facing when I use Localizator, the key header has changed to different language.
So I need a standard key disregard of different language.
Maybe will be better when you will using query from data (which is inside of B4Xtable) - like this:
Example code:
Dim tblOpravila as B4XTable
' c0 = ID in table, C1 = link, C2 ... C9 = name, c10 = date, ...
Dim Query as String = "select * from data where c0 = " & Id
Dim rs As ResultSet = tblOpravila.sql1.ExecQuery(Query)
Dim rec As Map
rec.Initialize
Do While rs.NextRow
rec.Put("id", rs.Getint("c0"))
rec.Put("name", rs.GetString("c9"))
Loop
rs.Close
In this case you can create map with fixed ID-s...