B4A Library [Class] Flexible Table

klaus

Expert
Licensed User
Longtime User
The Table class has been updated to version 3.29 in the first post.

Version 3.29
Amended problem with column colors
Version 3.28
Added NumberOfColumns in the code
Added TopRowIndex method
Version 3.27
Amended MultiSelect
 

adriano.freitas

Active Member
I have been using this class with great success, congratulations to those involved in the development!
Now I have had a problem with her. I have an application that at any given time tries to insert a text content that has line breaks (CRLF) into a cell. The intention would be for it to display the text on multiple lines, or at worst, it would be on a single line, but what happens is that it closes the application with an error. If debug is enabled, it informs "out of bounds" in java classes. Any idea how to solve it? for me to write the text in several lines, how should I proceed?
 

adriano.freitas

Active Member
Another question: Is there any way (even with some change that can be made to the class) so that only specific lines can have a different height?
 

klaus

Expert
Licensed User
Longtime User
Hi adrian0.freitas.
Sorry for answering only today, I do not know why I missed your posts.

For the out of bounds error do you have an example because I cannot reproduce it.
By default the cells are defined as SingleLine.
To be able to have multi line cells you need to set The SingleLine property to False.

Different heights of certain lines is not possible. It would need a huge modification.
The Labels for the lines are predefined and reused.
 

adriano.freitas

Active Member

Thank you for your attention and answers!
 

Mahares

Expert
Licensed User
Longtime User
In version 3.30, you added a check for non numeric values for numeric sorting. By doing so, the records where the column data is blank are no longer showing in the table. Maybe, instead of eliminating them from the data display., the developer should have used the IFNULL(col, 0) in the query so the record is still displayed, but that column data will show 0 or any other unique number to distinguish it from the rest of the column value.
 

klaus

Expert
Licensed User
Longtime User
By doing so, the records where the column data is blank are no longer showing in the table.
How did you notice this ?
If there are blank fields no sorting is done and a message in the Logs is displayed.
No record is deleted.
 

Mahares

Expert
Licensed User
Longtime User
If there are blank fields no sorting is done and a message in the Logs is displayed.
I do not want to burden this thread, so I put my answer in shelby's thread.
 

adriano.freitas

Active Member
Hi!

I have been facing another problem: I need to use Table to contain data that is dynamically changed, including number of columns, rows, colors, etc (sometimes restarting the table - through INITIALIZETABLE). It happens that when I define colors for the columns works fine, but an error is generated when I restart, change the number of columns or fill the table through csv file. It generates an "out of bounds" error. I tried everything with no solution! If I remove the code that sets the column colors, everything works fine! Some suggestion?
 

adriano.freitas

Active Member
Hi...

It's difficult to put the project in because it's too big and complex, maybe it wouldn't work there because of access to the corporate database, etc.

What I could see is that if I have to reconfigure the table with the same number of columns the error does not occur, but if between one view and another the number of columns is changed, the error occurs. If I define the colors of the columns before filling in, I think that the number of colors is different from the number of columns. If I define the colors later I think the error occurs because when I fill the table with data it must remain with the previous list of colors which is different. Maybe that's the cause of the problem, amounts of different colors and columns.
 

klaus

Expert
Licensed User
Longtime User
Sorry for answering only today, I was quite busy the last time.
Unfortunately, without seeing any code on how you did this it impossible to give a concrete advice.
You should not use InitializeTable because this is only useful when you add a table in the code and not in the Designer.
Have you tried ClearAll instead of InitializeTable.
How do you fill the Table ?
 

adriano.freitas

Active Member
Hi,

Yes, I tried, it's still buggy. I'll try to simulate the error later and send, for now, I made palliative changes that worked out a way, however, nothing technical or recommendable.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…