Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

TableViewer Refresh not preserving selection  RSS feed

John Rubistein
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a doubt about the refresh method of the TableViewer.

The API says that if I use refresh and set reveal as true, it will preserve the selection, however that doesn't seem to be the case, cause everytime I do it, it loses the selected row.

What I do is that I have an inputProvider that rebuilds the data array every 30 seconds, and when that happens I trigger the refresh to properly update, add, and remove rows.

Another thing I noticed is that everytime I do that, the tableViewer rows have a different ID everytime, seems like it's incrementing. If I do it this way, would I eventually have a problem if the id becomes too big, or when it reaches a limit will start back at 0?

Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!