Hi,
when I am using an observable collection of the following class as ItemsSource for the datagrid I get an exception when I add a new Row (via UI, ShowInsertRow is enabled) and the row is commited.
ArgumentOutOfRangeException: "Specified argument was out of the range of valid values. Parameter name: index".
Source: "Telerik.Windows.Data"
Stacktrace: "bei Telerik.Windows.Data.QueryableCollectionView.GetItemAt(Int32 index) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Zeile 1766."
File Version of Telerik.Windows.Controls.GridView.dll is 2011.2.712.40.
This happens only when binding a list of ParameterView. ViewModelBase just implements INotifyPropertyChanged.
when I am using an observable collection of the following class as ItemsSource for the datagrid I get an exception when I add a new Row (via UI, ShowInsertRow is enabled) and the row is commited.
ArgumentOutOfRangeException: "Specified argument was out of the range of valid values. Parameter name: index".
Source: "Telerik.Windows.Data"
Stacktrace: "bei Telerik.Windows.Data.QueryableCollectionView.GetItemAt(Int32 index) in c:\TB\102\WPF_Scrum\Release_WPF_40\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:Zeile 1766."
File Version of Telerik.Windows.Controls.GridView.dll is 2011.2.712.40.
This happens only when binding a list of ParameterView. ViewModelBase just implements INotifyPropertyChanged.
public class ParameterView : ViewModelBase<ParameterView> { private string _name; public string Name { get { return _name; } set { _name = value; Notify(x => x.Name);} } private string _value; public string Value { get { return _value; } set { _value = value; Notify(x => x.Value); } } public ParameterView() : this(string.Empty,string.Empty) { } public ParameterView(string name, string value) { Name = name; Value = value; } public override string ToString() { return string.Format("Name: {0}, Value: {1}", _name, _value); } public bool Equals(ParameterView other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other._name, _name); } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != typeof(ParameterView)) return false; return Equals((ParameterView)obj); } public override int GetHashCode() { unchecked { return ((_name != null ? _name.GetHashCode() : 0) * 397) ^ (_value != null ? _value.GetHashCode() : 0); } } }