Grid selection selected state

1 Answer 108 Views
General Discussions Grid
Daniel
Top achievements
Rank 1
Iron
Iron
Daniel asked on 15 Dec 2021, 08:14 AM

Hi, 

according to the documentation about the selection, I see when we select a row the selected state gets only the id of the field and value true.

I wonder how to get all the selected row details as object instead? 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 15 Dec 2021, 09:20 AM

Hello,

Currently, we provide only the object id. The developer can use the event information to get the full item:

https://stackblitz.com/edit/react-c15bug-qjfthx?file=app/main.tsx

  const onSelectionChange = React.useCallback(
    (event: GridSelectionChangeEvent) => {
      let theSelectedItem = event.dataItems[event.endRowIndex]

 

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions Grid
Asked by
Daniel
Top achievements
Rank 1
Iron
Iron
Answers by
Stefan
Telerik team
Share this question
or