API for in-visualisation filtering (table)

Hi Datagrok team!
Is in-visualisation filtering already available for a table viewer (API only)? If yes, could you please provide some example or documentation link on how to use it?

Hi @ekaterina.stepanova.novartis.com, at the moment, you can filter rows in the spreadsheet by using the setRowOrder command:

let view = grok.shell.addTableView(grok.data.demo.demog());
view.grid.setRowOrder([1, 2, 34]);  // only show these three rows

Unfortunately, this approach does not work well with filtering, and this manual filtering will get reset whenever the filters are applied. We are working on the proper solution that would allow you to specify the filter as formula, the same way it is implemented for scatter plot and a few other viewers.

1 Like