Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2275
Adding a row fails with ObservableCollection
posted

Hi, I'm trying to add a row to a XamDataGrid programmatically and I keep getting an exception with the error "Can't add items to a DataPresenter that is bound to a datasource."  My FieldLayoutSettings has AllowAddNew=True.  My call is 

dgPatients.DataItems.Add( e.Patient );
where dgPatients is the XamDataGrid, and e.Patient is a patient object.  The DataSource of the grid
was populated with an ObservableList.

Thank you.