I have a DataGrid which is binded with a List. Consider I have 10 Items in the List, so in the combobox also.
Currently 2nd Item is selected in the DataGrid.
Now I am selecting the 3rd item in the DataGrid.
In the DataGrid SelectionChanged event, I am doing some validation and validation fails so I don want my Selection is changed from 2nd item to 3rd item or the selection should remain in 2nd item.
Please let me know how to do this?
In the DataGrid SelectionChanged event, I tried to set DataGrid.SelectedItem = 2ndItem.
But this didn't work properly.
Hope, my requirement is clear. If you have any doubt then please feel free to ask me.
View Complete Post