TableView Extension v3


#82

I am using data type String:

In my test app I have 2 columns, the first column is 13 characters and second column is 0-50 characters and I have over 5000 records and I’ve never had an issue.
Note: I am using a Samsung S8


#83

Gues it’s my sqlite that does trick, If I do it with the builtin sqlite this does not work.


But I’m using Taifun’s SQLite end then my method does work


#84

Hello,
Taifun’s sqlite returns a list of values (not enclosed in quotes) separated by a comma and the end-of-line is a newline character (\n).
If I give this list to the datasource of a tableview and do a build table, balues are shown.
But, when I retrieve numerical values (stored as integer) they are not shown, if I have text columns with numerical value in it, they are shown.
If I try to cast the integer to text nothing changes, if I put quotes around the numerical value it is shown.
How to circumvent this problem?

Another problem is with the column widths, sometimes they give the width of the maximum contents, sometimes they don’t, even the header columns is then split over sevceral lines.

I have a column which width is smaller than the column width, the first few rows are shown ok, the next rows have the value with a black rectangle under them, scrolling further in the table shows higher black rectangles.

If you want I can post or pm an example with this behaviour but it requires taifun’s extension wich is not for free.


#85

I haven’t tested this in any of the builders but try:
select cast(some_integer_column as text) from some_table

Currently, All cells in the row need to have the same amount of lines.


#86

It’s got something to do with shrinktofit property, if I put this to false, numeric columns are shown all column widths are ok, black boxes are gone


#87

In order to avoid horizontal scrolling I set the table arrangement to a HorizontalArrangement instead of a HorizontalScrollArrangement but this does not help , If my list contains to many columns the table is horizontal scrollable.

I can restrict the columns in my select but I need them because they will show up in a detail screen that will be shown when a row in the table is clicked. I want to pass the values from those columns to the detail screen.

I can choose to only pass the unique key of the table but then I have to re-retrieve the data from the sqlite database and that’s something I want to avoid.

Is this possible?


#88

Don’t use scroll Arrangement.

The scroll is automatic if the table is to wide for the screen it automatically enables Horizontal scroll.

If the table is to tall for the screen it automatically enables Vertical scroll.

You’d need to reduce the CellPadding and/or FontSize, remove some columns or reduce the amount of characters in the cell.

You could also set the screen to landscape orientation so more columns can fit on the screen.


#89

Hello,
I think I found another issue in latest version of tableviewe (the beta).
When you use one tableviewer for the headers and another one for the data you have to change fonts and colors in the top row of the data one, so far so good.
But the top row in a tableviewer is not selectable, I need to be able to click on a row to get the data ans start further processing, is there a way to change this behavior?


#90

Screenshot_20190218-082648_Chrome

Please review all options


#91

this is a wonderful extension. but unfortunately it lacks one small addition, namely, to the reflection of the table it was already possible to select the desired row. is this real?


#92

I’m not sure that I understand your question.
You can get the rowText:


#93

Hi Ken,

I see that the rows in the extension starts at 0 (I guess for the header), but it won’t work with the block “Insert list item”
InsertItem0

Is it possible to change it to start at 1?


#94

In programming pretty much everything starts at 0 but AppInventor changes it to start at 1 to make it less confusing for non-programmers.

I have thought about changing my code to start at 1 so it’s more inline with the AI model.
I haven’t looked at my code for this extension in several months. I will add starting at 1 to my list of future updates.

Thanks for bringing this to my attention.


#95

That would be helpful! Thanks a lot!


#96

Hi Ken?
I just sponsored this extension.
I’ll attach my wishlist

  • Make it possible to have more than one tableview on the same window, right now the second one crashes from sometimes.
  • Make it possible to keep headers on top if you scroll down.
    I know you enabled it in a beta but working with two tableviews has problems in keeping the headers and the data in sync if you scroll to the right, you had a solution for the width of the columns
    The current solution with two tableviws has also problems showing the selected row, it does not always select from the first time, if there is only one row it is not selectable.
  • Is it possible to show images in the list and also for checkboxes, now the tableview simply shows text.
    The checkboxes would make it possible to select more than one row , for example for row deletion

#97

I love this extension. It’s just what I was looking for. I’ve attached an image of what I’ve been able to do with it so far and I think it looks amazing.

I know that I’m in no position to be making requests, but “The answer is always ‘No’, if you don’t ask.” so …

I would love to have a way to be able to change the background color of specific rows inside the table… something that would just override the pre-set Even & Odd colors for just that specific row.

Perhaps something like a color override code (a simple RGB string and a special delimiter i.e. 255,255,255\c) that could be prefixed to the row DataString and parsed by the extension as it builds the table?

If something like this isn’t doable or too much work, I can understand.

Again, I thank you for this great extension… it has made my programming of my app 100x easier.


#98

I’m glad you like it!
Thanks for sharing the picture, I often wonder how other people use my extensions in their projects.

If you would like to sponsor a new feature please PM me.


#99

I agree with @DocDrydenn it is really fantastic and of enormous help. THANKS AGAIN!