Android Question B4XTable Column AutoWidth and Scrollable Vertically and COLUMN_TYPE_DATE

Mahares

Expert
Licensed User
Longtime User
1. Auto column width will be a real valuable addition.

2. Is there a way to get the table to be also vertically scrollable besides scrollable by page only. Scrolling vertically is more intuative

3. I have a date in a SQLite table that is in this format: M/d/yyyy. When I assign it to COLUMN_TYPE_DATE it displays all the dates with date 12/31/1969. Is there a way I can use the formatter to change it so I can use its current format M/d/yyyy and be able to sort with it.

4. The library seems to have many great features, some are hard to figure out their usage. I wish the tutorial can cover all of them
Thank you
 

Mahares

Expert
Licensed User
Longtime User
The columns are resized automatically by default.
True, All columns’ s width are automatically set, but they are all the same width. I have a COMMENT column that is actually truncated unless I manually change its width to a much larger width than the default.

You should change DateTime.DateFormat.
App date format: DateTime.dateformat="M/d/YYYY"
System date format: same as above
SQLite table date format: same as above
When displaying the table, all rows show: 12/31/1970 if I use a table with: COLUMN_TYPE_DATE regardless of their value in the table. For example: 12/29/2018 shows up as 12/31/1070
The only way it works is if I create via SQLite an alias date of: YYYYMMDD and use text, then I can sort by the date. Can you give an example on how formatting: COLUMN_TYPE_DATE works
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
B4XTable1.AddColumn("Birthday", B4XTable1.COLUMN_TYPE_DATE)
B4XTable1.SetData(
Array(Array(DateTime.DateParse("02/23/2007"))))
Thank you for clarifying the B4XTable1.COLUMN_TYPE_DATE. The remaining issue I still have is the columns WIDTH. Although they are automatic, they all have the same width. For a long comment, the data gets truncated unless I change the width of that column manually. If anyone had luck with long column content not truncating, please help.
Thanks
 
Upvote 0
Top