Reputation: 3601
I've a WPF datagrid, I want to get all the selected cells in the grid, I could do it by looping through all the items, so is there any built in way to do so?
I set two properties in DataGrid:
SelectionMode="Extended" // for multiple selection
SelectionUnit="Cell" //row should not be selected but cell should be
Thanks.
Upvotes: 1
Views: 4292
Reputation: 1
I know that Grid.selecteditem
works for row select; I would think it should work on cells too.
Upvotes: 0
Reputation: 4774
DataGrid has SelectedCells property. Is it what you`re looking for?
Upvotes: 6