I have an interactive grid where i select the records and add to another table. This interactive grid has many rows spawned over multiple pages. When i select the records by navigating through multiple pages the selected records are persistent, but when i try to search for a record the selected records are erased and only the new one which is searched is shown.
I have put this below code in the IG attributes Javascript section.
function(options) {
options.defaultGridViewOptions = {
persistSelection: true
};
return options;
}
This is not making the selection persistent when data is searched and selected. Any suggestions would be really helpful.
Thank you
Persisent selection preserves selection when navigating to other pages. When a search is performed, the selection is reset. That is the behaviour you're seeing. A workaround is to store the selected items in a page item and add to it. Here is an example on an interactive grid on the EMP table:
Note that it is not possible to "unselect" something with the code above, because it is impossible to know if something was selected before a search or not.