[FREE] TableViewer - fully style customized to show table data

in ai2 blocks. You need to caculate the sum of the data and add list item ["Total","",1422,11033,""] to end of your data list .

Here you are:

t_tableViewer_revisedAgain.aia (27.8 KB)

image

(I did the blocks like this to fully show what was happening, should be easily possible to improve the block construction to get the totals)

2 Likes

Sir TIMAI2, you are really great teacher and problem solver.
You have fulfilled everything.
I salute you.
May you live long.
Regards

and prosper :wink:

2 Likes

Respected Sir,

I have applied following formats to table

1- Text Alignment = Right
2- Current row highlight
3- Current cell highlight

Now I want to apply comma format like this

11433
to
11,433

Only on numeric columns including summary row.

Here is aia
t_tableViewer_ver2.aia (29.4 KB)

Please help

You need to manipulate your list data using text/maths blocks. This has nothing to do with the Tableviewer extension.

That said, you may need another extension ro do this correctly:

image

NFormat

I was trying to set the border color after TableViewer1.ClearStyle using this block


but the boder color is always white. I was trying also

with the same negative result.
Could you please tell where is my error?
p.s.Thank you for an excelent extension!

Try like this:

table {width:100%;border-collapse:collapse;} 
th {border:2px solid red;padding:5px;text-align:center;} 
td {border:2px solid red;padding:5px;text-align:center;}
2 Likes

Thank YOU VERY MUCH! It works!!!

Sir I have these blocks

and here is aia
my_table_data_picker.aia (27.0 KB)

I want to display selected row data into above textboxes as follows

Please help

Look at the examples, these will show you how to do this, after collecting the row values, select each from the list and assign to each textbox .

Not sure why you are using the runjs blocks?

Sir I used runjs for formatting.
The examples tells that only current cell value can be stored in variable but I need to display 3 cells values in 3 textboxes.

Regards

1 Like

Thanks sir, It works fine.

You can try like this for row selections, will update colours after a different row is selected

2 Likes

Sir I have these codes blocks

I want to apply background row color where the length of first column is 4 like this

four

1101
5102
9506
The length of above digits is 4 so the background color of relevant rows need to be changed.

Please

four_digits_color (1).aia (25.5 KB)

Sir this time, I have these blocks

It displays this data

but I want to Highlight only those rows whom length of first column is 4 like this

four

Here is aia
four_digits_color (2).aia (26.8 KB)

Please help

in this thread there are many examples for how to high light one line.

You question is how to find out the line number. Use the for loop to get what you need.

Respected Boss,
I have tried my best to sort out the issue in this thread

https://community-appinventor-mit-edu.ezproxy.canberra.edu.au/t/free-tableviewer-fully-style-customized-to-show-table-data/67190/278?u=tariq_mehmood

I find out all string those length is 4, I also used loop to apply background color on specific row but not fulfilled.

Can you please show some hints?

Regards

2 Likes