We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

RowIndex after sorting

Sorting is allowed.

The application iterates through the grid datasource and selects records on some criteria. These selected records should be shown using the Grid.SelectRowsAsync() Method.

The issue is, that due to sorting the records of the datasource are not in the same order of the records displayed in the grid and therefor the "wrong" records are selected.

How can I get the sorted datasource?


1 Reply

PS Prathap Senthil Syncfusion Team April 3, 2023 11:40 AM UTC

Hi Franz,

We have checked your query and we suggest you use GetCurrentViewRecordsAsync method. Also, we would like to inform you that the GetCurrentViewRecordsAsync method will return data present only on the current page DataGrid. If paging is applied in DataGrid then it will bring the current view records. If the method meets your requirement you can use this method to get records. Already we have documented for this currentviewRecordsasync method using get data and  condition based on selected records using a databound event:
Documentation:
https://blazor.syncfusion.com/documentation/datagrid/selection#multiple-selection-based-on-condition

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_GetCurrentViewRecordsAsync


Kindly get back to us if you have further queries.


Regards,
Prathap S


Loader.
Live Chat Icon For mobile
Up arrow icon