Maintain data grid selected row between page loads

If a user selects any row of data grid (single selection), and then visits some other pages and comes back to this page containing data grid. Can I maintain his selection and show that row as selected between these navigation changes and page loads? The data grid is being listened by a data view which shows some information based on user selection. I want application to remember that user selection and always show him the relevant information between page loads. 
2 answers

Might be possible


var grd=dijit.byId('mxui_widget_DataGrid_0');

Have not tested this on multi select [tpl]grids but it does seem manipulate the current selection widget attribute and updates the widget dom
You will also have to use grd.get("selection") in order to get the selection.

With this in place you have to write a widget that interacts with the grid and populates some entity with selection objects via the JS crud api and set up the appropriate tables in Mendix

Good luck (when you’re done put it on GitHub)


Hi Umar,

I think this is not possible out of the box for whole page loads. Maybe it is possible to create your own page selection? You would need something like a wrapper object, an object to point and store the selected entries which is toggled for list items you clicked on and apply custom styling to highlight the rows where the boolean is true? Not that easy, I think