oh thanks, by the way is there a way to merge cells?
See above:
Hi, I'm trying to load data from an SQLite file into a tableviewer table, but add my own headings that are not the same as the field names in the file. I have found how to load headings into tableviewer and I can display that, but then when I load the SQL file into Tableviewer, it overwrites what is already there so the headings get lost. So I figured a way to do it would be to create a list first, load the headings, then load the SQL output into the list, and then load the list into tableviewer. I then found out about the 'list of lists' problem with simpleSQL, and I thought running the SQL output through the 'fixer' block would fix that. But when I do that, tableviewer is not able to display the results and crashes at run time. So at the moment I'm stuck and not sure how to achieve the effect I want. Below are the current version of the screen code and the results it produces. You can see from the second line of the table that what is in each field should actually be a whole line. Does anyone know how to solve this without doing extensive string operations to reformat the output of the SQL (which I could do if necessary but obviously want to avoid), or is there an easier way of achieving it I haven't spotted? Your feedback gratefully appreciated.
Show the output from here:
You probably want to "insert" your headers to this list/table at index 1....
Hi, this is what the output from that section of code looks like (and thanks for getting back to me so promptly):
When you said to insert the headers to the list / table at index 1, I think I can work out how to do that, but the issue is getting the SQL into the list. I can get the SQL into the tableview directly, but not via list, yet.
Try use 'append list to list', not 'add item to list'.?
I would suggest you use the fixer block to ensure proper functioning of list operations.
Ah, you're right. As I found out, it can visually load the data into a list correctly, but the problem comes when you're trying to read a row out of that list using the index from the selected table entry. Inserting the fixer block back into the 'select' query didn't change how the data appeared, but it made the 'select list item' block work properly. Thanks.
I'm sorry, but did you mean JSON? I have same problem, still looking for solution
- you need call init function before setData.
- show the 'generate table ' on a label and tell us what's on the label.
the data looks fine.
but one tableviewer working for one layout only.
Got it. Thanks for your help @Kevinkun. If you could make a dynamic extension, that would be really cool.
The shaking problem still exists. Not that frequent anymore.
please upload a demo app to replicate this shaking problem.
Only relavent blocks needed.
I thought that is was over after my reply at januari the 9th but sometimes it still occurs. I shared this code already then.