M Mahares Expert Licensed User Longtime User Feb 12, 2019 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Feb 13, 2019 #2 1. The columns are resized automatically by default. 2. No. B4XTable is page based. 3. You should change DateTime.DateFormat. 4. All the features are covered in the library thread and in the currently four tutorials: https://www.b4x.com/android/forum/pages/results/?query=b4xtable&prefix=8,9,18,21,27 Upvote 0
1. The columns are resized automatically by default. 2. No. B4XTable is page based. 3. You should change DateTime.DateFormat. 4. All the features are covered in the library thread and in the currently four tutorials: https://www.b4x.com/android/forum/pages/results/?query=b4xtable&prefix=8,9,18,21,27
M Mahares Expert Licensed User Longtime User Feb 13, 2019 #3 Erel said: The columns are resized automatically by default. Click to expand... 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. Erel said: You should change DateTime.DateFormat. Click to expand... 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
Erel said: The columns are resized automatically by default. Click to expand... 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. Erel said: You should change DateTime.DateFormat. Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User Feb 13, 2019 #4 Sounds like you are not inserting the data correctly. The column values should be ticks (long number). Full example: Code: Copy B4XTable1.AddColumn("Birthday", B4XTable1.COLUMN_TYPE_DATE) B4XTable1.SetData(Array(Array(DateTime.DateParse("02/23/2007")))) Upvote 0
Sounds like you are not inserting the data correctly. The column values should be ticks (long number). Full example: Code: Copy B4XTable1.AddColumn("Birthday", B4XTable1.COLUMN_TYPE_DATE) B4XTable1.SetData(Array(Array(DateTime.DateParse("02/23/2007"))))
M Mahares Expert Licensed User Longtime User Feb 13, 2019 #5 Erel said: B4XTable1.AddColumn("Birthday", B4XTable1.COLUMN_TYPE_DATE) B4XTable1.SetData(Array(Array(DateTime.DateParse("02/23/2007")))) Click to expand... 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
Erel said: B4XTable1.AddColumn("Birthday", B4XTable1.COLUMN_TYPE_DATE) B4XTable1.SetData(Array(Array(DateTime.DateParse("02/23/2007")))) Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User Feb 14, 2019 #6 Here: https://www.b4x.com/android/forum/threads/b4x-b4xtable-resize-columns-based-on-content.102678/ Upvote 0