[REBORN !] TableView Extension Versions 3&4 (pre nb191) and 5 by @Ken

I use 2 istances of TableViewV4 with the columns widths function, timer etc. but this is my problem:

The data are very variable in lenght so i asked for fit to the max lenght between values and header.

My Blocks:

You may need to untick Stretch to fit AND Shrink to fit on both tableviews

image

Before

image

After

image

To get them to scroll horizontally together, place the two arrangements in a vertical arrangement, then place that vertical arrangement in a horizontal scrolling arrangement

I just tried all possible combinations between the two tables but nothing changed. :disappointed:

Try this
TableviewWidths (1).aia (24.2 KB)

image

It truncate the value if longer then the headers.
TableviewWidths (1).aia (24.3 KB)

Alternatively (as previously posted here)

i tried it but it has too many blocks to manage and in my apk there are 14 tables to manage (28 tableview instances).
I propose a V5 :rofl:

in any case, thank you so much

Possibly: one table, fourteen datasets?

Follow the dry principle

As @TIMAI2 already suggested

Taifun

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....

image

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.

  1. Flag to block headers on top directly in settings
  2. adapt the width of the columns to the longest string between values and headers (perhaps already included in the first one)
  3. possibility of highlighting the single cell

all can be done by tableviewer.

This is already in the blocks I provided

1 Like

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 ?