Hi,
I am using kendo react grid using sample available here.
https://www.telerik.com/kendo-react-ui/components/grid/selection/ "Section" : Customizing the Selection, where using checkbox to read all the selected rows.
Using the above sample , i have created grid with checkbox only on rows NOT on header checkbox as single selectable row. since my grid data will be changed frequently by adding or removing rows, i am maintaining data in react hooks useState and update this state will reflect in grid. all works as expected, but, i have below issue.
I am writing onSelectionChange event where i wanted to check/uncheck based on user selection and update my state based on this selection, when i try to update state object by reading all rows in grid using event.dataitems, i get rows only on specific page where pagination is enabled.
For ex, i have two pages with 10 in each, if i am in 2nd page and read all dataitems, i get only 10 rows in 2nd page. so i wanted to know how to read all the rows in grid irrespective of pagination. is there way to get it? the reason i'm asking is useState is not updating state immediately and i am getting previous state data and i am loosing the changes made by other events(delete/add).
here is the onSelectionChange event.