JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › React Data Grid
Using React “grid.current.getSelectedRows() ” returning empty array. Could you please suggest is there any way to get selected rows by doing rangeSelection
Hi,
getSelectedRows returns an array when there are selected rows. Otherwise it returns an empty array.
Regards, Markov
Below is the code sandbox url for react smart grid. I have tried selecting 3 rows using range selection. all of my selected rows data printing empty array https://codesandbox.io/s/rough-water-1lh72c?file=/src/App.js
In the given sample, you use cells selection so you should use getSelectedCells() method, not getSelectedRows() which is for rows selection.