Hi Dan,
Greetings from Syncfusion support.
Based on your requirement, you are having a grid with persistence enabled, and on rowSelected event you navigate to a new page. When you click on the back button you return to the previous page and the grid is refreshed and the rowSelected event is triggered automatically. This is because, since you have enabled persistence, the selectedRowIndex is stored in the persisted data. When the grid is refreshed the row gets selected automatically and the rowSelected event is triggered.
We have achieved your requirement by overriding an internal function `addOnPersist` method and removed the `selectedRowIndex` from the persisted items in the `dataBound` event of the EJ2 Grid.
function dataBound(args) {
var cloned = this.addOnPersist;
this.addOnPersist = function (key) {
key = key.filter(item => item !== 'selectedRowIndex');
return cloned.call(this, key);
};
}
|
Please get back to us for further details.
Regards,
Joseph I.