Loosing checked status of filtered rows in a grid

Hi Syncfusion!


I have a list of objects that I want to display in a grid. Since the list can get very long, I want to use paging (40 items) and filters. In addition, the lines should be selectable.


If I now select individual lines and scroll far down, it initially works as desired. However, when I scroll back up, some of the selected ticks are lost. This can be observed very well in the "SelectedRecords" property.



3 Replies 1 reply marked as answer

SP Sarveswaran Palani Syncfusion Team July 4, 2023 02:03 PM UTC

Hi Dominic,

Based on your query, it appears that you are experiencing an issue with losing selected records in a grid when scrolling back up. To address this issue, we recommend utilizing our built-in feature called "PersistSelection." This property ensures that the selection of records is maintained even when performing various operations, such as scrolling. By enabling this property, you can prevent the loss of selected ticks and maintain the desired selection behavior.


For more detailed information and implementation guidance, we have provided a documentation link and a sample for your reference. These resources will help you understand how to effectively use the PersistSelection property in your scenario.

<SfGrid DataSource="@Orders" AllowSelection="true" AllowPaging="true">

    <GridPageSettings PageSize="30"></GridPageSettings>

    <GridSelectionSettings Type="SelectionType.Multiple" PersistSelection="true"></GridSelectionSettings>

    <GridColumns>


Reference: https://blazor.syncfusion.com/documentation/datagrid/selection#checkbox-selection

If you have any further queries, please get back to us.

Regards,
Sarvesh


Attachment: SfGridSelection_ed9017a4.zip

Marked as answer

DL Dominic Limpert July 4, 2023 02:20 PM UTC

Hi Sarvesh!


It works.

Thank you very much!


Regards,

Dominic



SG Suganya Gopinath Syncfusion Team July 5, 2023 02:37 AM UTC

We are glad that the provided solution helped to solve the issue.


Loader.
Up arrow icon