Hi,
I need to export selected rows but after applying pagination the row which was selected earlier gets deselected and all selected rows not getting downloaded.
please guide me for the same.
Thanks,
Shivani
@Shivani Rajoriya you can add a boolean variable in your data structure to store the IsSelected value additional to the feature available in the grid for fetching selected rows.
When a selection happens on the UI for any record (or multiple records), set the value of this IsSelected variable to True, this way you won't lose the values of row selections after you turn the pages away. The current dataset on the screen will hold the value of that variable.
So whenever the user wants to export the records, you will have your own set of values taken from IsSelected variable to filter only the selected rows, and send it for exporting.
Hi @Shivani Rajoriya
We're currently trying to include an improvement on the method in order to use the whole Grid and not the current page. You can follow this on future release notes under the code ROU-3936.
Cheers,GM
Hi Shivani,
Please suggest if you're using server side paging or client-side.
I believe this won't be possible with server side pagination, unless you manage a separate logic to maintain a list ofrecords that were selected in previous pages.
If it's client-side paging, then you can just keep a track of selected items by filtering records using the boolean variable that controls the row selection.
Regards to which items not being downloaded, it is purely on the logic on how you consider which rows are selected. Once you fix your selected items problem in pagination, this will be automatically resolved since you'll have which items are selected by user, so only consider all those items when downloading anything from the grid.
Hi. That's correct! The selection is applied at the page level since that's the context where you have access to data.
Hi Ravi,
I am using the default pagination of grid, not the server side pagination.
Thanks