I\'m getting nuts here with this:
ObservableCollection list = new ObservableCollection();
dgEmployees.ItemsSource = list;
CanUserAddRows="False"
and IsReadOnly="True"
combination of both is better to ensure any additional inconveniences.
I've got it
on Datagrid XAML, put the attribute:
IsReadOnly="True"
The same problem persist in WPF 4.0 version of DataGrid, and it is caused by the add-new row which it shows automatically for ObservableCollection ItemsSource. Setting IsReadOnly as True it's too radical IMHO.
I solved it by disabling CanUserAddRows property if you don't need that behavior, but you still want cells to be modified:
CanUserAddRows="False"