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

You need to make a list of lists like this:

[["Kym"], ["Charmian"], ["Fannie"], ["Lyndy"], 
["Krissie"], ["Adi"], ["Merry"], 
["Boonie"], ["Nobe"], ["Paulita"], ["Aldon"], ["Doralyn"], 
["Gustav"], ["Alair"], ["Dody"]]

2 Likes

Thanks, it runs

Can we sort by clicking on the column headings in the table?

You would need to sort the underlying list, then reload it to the Tableviewer

I am getting the data from Google Spreadsheet. Is there a way to sort it while getting it from there?

What about using ORDER BY?

Taifun

1 Like

Yes, this works for me. Thank you. Now I have to learn to be able to use it in the TableViewer extention.

Dear @Kevinkun
Thanks for this great extension. I've just started to learn this extension.
As it does not support method Filter (to limit the list of records or to remove the filter showing all) I intend to filter records myself and then show table again - so:

  1. Is it the right way to filter (assign new dataset)?
  2. Current row method missing: How to get current row number to try to move to it (when filter is cleared or modify in a way preserving current record visibility) ?

regards and thanks again for this great extension
Jakub

may be you can remove the desire row from the global list and recreate the table view..

@Spicy_Topics
this is my intention - but from UX perspective it would be good to return to a "reasonable" location - my problem is I can't find method to get CurrentRow of TableViewer
regards, Jakub

image

1 Like

what do you mean by this? there is a ScrollTo methed, maybe you want to try.

1 Like

@Kevinkun
Thanks for reply.
Here is my scenario:

  1. I tableview1.SetData=recordset (I have some rows of data in recordset). It displays nice.
  2. I scroll tableview1 (not clicking so Click event does not fire).
  3. Now I manipulate recordset (filter, change, update from db or web call - whatever) and I want to update tableview (SetData) but I want it to stay on the screen where it was before SetData. So my idea was that I getCurrentCell (or Row/Col) before SetData call and use ScrollTo after SetData giving it arguments I just popped.
    I could do with one of (both have pros and cons):
  4. OnScroll
  5. GetCurrectCell
    Rgds, Jakub

Can you be certain that the "current cell" will be included in the filtered results ?

it depend on the operation. But knowing the row number I can check it in recordset and scroll appropriately. This is standard UX approach on grid refresh

Dear @Kevinkun,
I've successfully replaced ListView by your TableViewer. It added much needed functionality:

  1. I can programatically control filtering (I re-setData) incl. initial filters
  2. I can (in the future) add advanced filtering/sorting
  3. I can view multiple columns
  4. I can add summary row
  5. Handles easily 1200 rows (my current tests) with above filtering

But what I strugle with is providing visual feedback on row clicking- ListView sets color of the tapped row just before the event is fired (I feel small delay there so it is easily noticed before I open "details" screen for the chosen row). When I get back I can highlight same row (selected).
With TableView I know how to set colors but I can't match UX as I see no easy way to provide this "feedback" with appropriate delay (plus I do sth wrong on next redraw).
I was thinking maybe it would be good candidate for next version to provide:

  1. Dedicated property BackGroundOfSelectedRow (or cell?) applied just before OnClick event and also used on ScrollTo,
  2. Properties getters for the properties u provide setters (all properties),
  3. CurrentRow (or displayed cells range) to use as data for ScrollTo when needed (last priority).

Let me say again : great component even without those further improvements

Best regards,
Kuba

Can you make it (OS). I like to Add All Properties Values in to Source Code.
I am not Aware with Kotlin. Try to give me Java Source Only.

After the TableView extension stopped working under nb191, I'm trying to work with the TableViewer extension.

I have a problem with this:
In the extension TableView there is the block "TableView1.Click" with the options CellText and RowText.
How can I recreate these two options with the TableViewer extension.

In the extension TableViewer there are the options row, col and value, not CellText and RowText.

Frank

What did you try ?

value returns the cell content (CellText)

row returns row number, col returns col number - use these with list blocks to get list values from the underlying list.

1 Like

Thanks @TIMAI2 for your reply.
I understand the meaning of each option.
I want the TableViewer.Click method to output the contents of a row, not a single cell.

Example:
Table:

1 2 3 4
a b c d
5 6 7 8
e f g h

If the user clicks on the 2nd row, I would like to get the result: a, b, c, d shown, regardless of whether he clicks on cell a or b or c or d.

The RowText option has realized this in the TableView extension.