I have a DataGrid with multipleselection enabled. I need to add an invert selection functionality on click of a button. When I click on that button, all the selected rows should be unselected and all the unselected rows should be selected. Can anyone please tell me how can it be done?
change selectedIndicies property of your dataGrid. It should be an array with all indices of your dataProvider except values in old value of selectedIndicies.
Yeah as Natasha suggested use the selectedIndices, create a new array, do a loop an invert the selection and finally pass the new array to the DataGrid.selectedIndices.