JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › getSelection vs getSelectedRows › Reply To: getSelection vs getSelectedRows
Hi,
From the Grid API docs(https://www.htmlelements.com/docs/grid-api): getSelectedRows – Gets the selected row ids. getSelection returns{ rows: Smart.Grid.Row[], columns: Smart.Grid.Column[], cells: Smart.Grid.Cell[], focused: {id: string, dataField: string} }. So getSelectedRows, if the selection is rows selectection(i.e you have a marked row(s) as selected) will return an array with row ids. getSelection is another method which is basically more general and will return either cells, columns or rows depending on the chosen selection mode of the Grid.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/