I have a class that inherits ObservableCollection. Initially the collection is empty. When I bind it to the data grid and set the allow new to true. The add new row does not show up.
Here is some code:
this.xamDataGridTasks.DataSource=_contract.Tasks; this.xamDataGridTasks.FieldLayoutSettings.AllowAddNew = true; this.xamDataGridTasks.FieldLayoutSettings.AddNewRecordLocation = Infragistics.Windows.DataPresenter.AddNewRecordLocation.OnTop;
Hello,
One requirement for the AddNewRecord is that the underlying class has a parameterless constructor.
Does you class have one?
You can also use BindingList<T> instead of ObservableCollection.
Regards,
Alex.