Alternatively, if the button is outside of the grid, you can use the items() method to get all the rows and loop them to obtain the corresponding dataItem.
Finally, you could also use the dataSource view() dependent on the full use case.
In case you need further assistance, please give some more details about the desired outcome, perhaps accompanied with a description of steps or a screenshot.
Kind Regards,
Alex Hajigeorgieva Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
That's only for the row, what I need is to get the ID field for every row so I can pass it to another function in my code.
0
Alex Hajigeorgieva
Telerik team
answered on 20 Jan 2020, 08:58 AM
Hello, George,
It is not clear to me if the ids are needed on click of the columns command, however the easiest way to get the ids of items in the current view of rows is via the data source:
var itemIds = grid.dataSource.view().map(item=>item.id));
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.