Last Updated: February 25, 2016
·
1.783K
· joelhall

Databinding Issue with SelectedIndex in DataGrid

Quick tip. If using the Microsoft DataGrid in WPF, avoid binding to the SelectedIndex property. A bug in the DataGrid code causes this property to lose its binding in some instances. Instead, use the SelectedItem Property. If you really need the index, you can retrieve it using the SelectedItem.ItemIndex property. Better yet, use a better grid.