Other About B4XTable

LucaMs

Expert
Licensed User
Longtime User
I'm just "playing" with B4XTable; some thoughts (I have not yet verified everything I am about to write and... I still do not know what I am about to write 😇).

CellClicked event returns ColumnID and RowID; It would be very useful if it returned also the "Cell" (B4XView-panel), the value and the Tag (provided that the user-programmer is able to assign a Tag).

I'm fighting... SQLite Date fields & B4XTable (I almost won the battle) but creating a wrapper / non-wrapper (a class and a module(!)). In the event that I win the war, I could try to directly modify the source class of B4XTable or, preferably, Erel could make the necessary modifications (the example: "[B4X] B4XTable - Load data from SQL(ite) database" does not include date fields).

Writing this "big" post... I forgot whatelse I wanted to write 😄 (damned memory :confused:).


[I take advantage, even if it is not really the topic in question, to say that I would have liked to modify the original class by creating at least two Regions, "Public methods" and "Private methods", so I renew (only here) my request to have different icons for the two types of methods]
 

LucaMs

Expert
Licensed User
Longtime User
B4XTable already supported date fields.
This is, I think, if you save date values as long (ticks) into a field, but if you work on an existent SQLite DB, in which fields are defined as DATE, DATETIME, TIME, TIMESTAMP, these are texts.

Also, it would be nice to have specific views for date fields, instead of labels or date dialogs (date-time picker) that appear on click.

This also I think is very useful (you have to jump through hoops to get these things, whenever possible).
CellClicked event returns ColumnID and RowID; It would be very useful if it returned also the "Cell" (B4XView-panel), the value and the Tag (provided that the user-programmer is able to assign a Tag).
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
To test, I created a "mad" sqlite db-table:

1581935543576.png


What kind of Cursor.GetXXX would you use? You have to use GetString.

Something like this would be very "nice" (useful and powerful):

1.gif
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You are confusing different things. B4XTable has nothing to do with your SQLite database. The data can come from any source you like.
Dates in B4X are represented as ticks. This is true in B4XTable as well.

If your data come from a date string then you will need to parse it first with DateTime.DateParse.

B4XTable is not editable by default. You can make it editable by customizing the interface as demonstrated here: https://www.b4x.com/android/forum/t...ditable-b4xtable-form-example.104766/#content
You can put any view you like inside the cells as explained here: https://www.b4x.com/android/forum/threads/b4x-b4xtable-with-custom-cells-layout.102352/
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
You are confusing different things. B4XTable has nothing to do with your SQLite database. The data can come from any source you like.
Dates in B4X are represented as ticks. This is true in B4XTable as well.

If your data come from a date string then you will need to parse it first with DateTime.DateParse.

B4XTable is not editable by default. You can make it editable by customizing the interface as demonstrated here: https://www.b4x.com/android/forum/t...ditable-b4xtable-form-example.104766/#content
You can put any view you like inside the cells as explained here: https://www.b4x.com/android/forum/threads/b4x-b4xtable-with-custom-cells-layout.102352/
Ehm... I know all that :)
 
Upvote 0
Top