Skip to content

[SfDataGrid] Load pagination API, not using SfDataPager for pagination, but a custom pagination selector. How can I track and restore the state of checkboxes? #1421

@hardgit

Description

@hardgit

Hello, I have customized a pagination selector using a List. When I click on a checkBox, I use onSelectionChanged: (addedRows, removedRows) to listen to the selected rows. When I switch pages and make API requests, I try to set the checkBox state again. However, I noticed an issue where evaluateDataSource.effectiveRows is always empty. I also tried to add dataGridRows to effectiveRows in the void buildDataGridRow(List data, int indexStart) function. Although effectiveRows now has data, setting dataGridController.selectedRows = selectedRows does not restore the checkBox state. Can you please advise me on what to do?

onSelectionChanged:
image

request data:
image

void buildDataGridRow(List data, int indexStart)
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions