Possibly: one table, fourteen datasets?
Where possible I used the same tableview. The app is a portable read-only version of the corporate ERP. There are 10 screens, 14 tableviews (28 with headers) and the datasets are 35 (MSSQL queries via PHP). but that wasn't the point...
I'm a mechanical engineer and I'm new to the world of programming. I have read many forums and followed all your advice (thanks for your wisdom and I apologize for my ignorance).
Surely there will be a better way to do what I did. Sorry for that!
This is one screen blocks with many queries and 1 tableview.
And this is 1 screen with 5 tableviews.
Try this, using Tableviewer extension.
TVTemplate.aia (18.2 KB)
These should be all the blocks you need....
The behavior is exactly what I was looking for. now I have to figure out how to lock the header at the top and how to select the rows (I saw that you can also select single cells). I'll work on it now. Thank you very much
In any case, the proposal for Ken to make version 5 is still valid.
- Flag to block headers on top directly in settings
- adapt the width of the columns to the longest string between values and headers (perhaps already included in the first one)
- possibility of highlighting the single cell
all can be done by tableviewer.
This is already in the blocks I provided
Awesome Thank you
You might be better off using YAML for your table displays.
Se
I've read it but my problem is not the data, I use MSSQL queries through PHP and it's super fast even with a huge amount of data like that of an ERP. The problem is simply the display of this data, indeed simply the formatting of the table. thanks anyway for the advice, now I know one more thing.
Could you please share how to connect App Inventor with a MSSQL database? Which blocks do you use? How does your php script look like? You could use the following thread for that
Thank you in advance
Taifun
I have a problem with the TableView v4 extension.
Is there a solution for this?
Frank
Runtime error:
java.lang.NoSuchMethodError: No static method setFontTypeface(Landroid/widget/TextView;IZZ)V in class Lcom/google/appinventor/components/runtime/util/TextViewUtil; or its super classes (declaration of 'com.google.appinventor.components.runtime.util.TextViewUtil' appears in base.apk)
Note: You will not see another error reported for 5 seconds.
Are you attempting to change the font ?
There is no option for this, other than the built-in fonts
Is this related to your other problem with companion and emulator ?
This is a 2nd issue independent of Companion and Emulator.
I used this sample file, created an apk and got the runtime error.
TableView_v4.aia (24.4 KB)
Try this
TableView_v4_revised.aia (24.4 KB)
I changed all your /n
to \n
to provide correct csv format.
Works fine for me, companion and compiled
Thank you, my mistake.
Frank
The apk file works if I create your aia file using http://ai2.appinventor.mit.edu.
If I use https://ai2-test.appinventor.mit.edu/ to create the file, the error message comes up:
Runtime error:
No static method setFontTypeface(Landroid/widget/TextView;IZZ)V in class Lcom/google/appinventor/components/runtime/util/TextViewUtil; or its super classes (declaration of 'com.google.appinventor.components.runtime.util.TextViewUtil' appears in /data/app/ ...
A test with Companion or USB is not possible for reasons you know (see above)
Frank
This may be due to the new font functionality in the upcoming nb191 ? Will be a shame if it is.
It may be possible to add the same functionality to the extension if @Ken approves, or to remove the font option from the extension.
Easier to just take it out ?
@TIMAI2
Since I use the TableView extension in several programs, this is very time-consuming.
In addition, I have not yet found an extension that corresponds to TableView in terms of scope.
@KEN
Would it be possible for you to adapt the extension?
That would be very very nice of you.
With the new nb191, the error message now occurs constantly.
Future newer versions of my programs will no longer run.
Greeting Frank