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
1470
Error when setting DataTable.DefaultView as ItemsSource
posted

I have a DataSet with 3 DataTables and two relations.

Like this:

Parent

Child

ChildValues

 

There is no problem, when i adding Parent.DefaultView as ItemsSource if all Tables are empty.

As soon i have one or more row in the DataSet and the grid property AddNewRowSettings.AllowAddNewRow is set to: Bottom, i getting this error:

Source:

InfragisticsWPF4.DataManager.v12.1


Message:

"DataManager hat versucht, eine Instanz des Typs 'System.Data.DataRowView' ohne leere Parameterliste zu erstellen."

Stacktrace:

   at Infragistics.DataManagerBase.GenerateNewObject()
   at Infragistics.Controls.Grids.RowsManager.GenerateNewObject(RowType rowType)
   at Infragistics.Controls.Grids.RowsManager.ResetAddNewRows(Boolean generateNewData)
   at Infragistics.Controls.Grids.XamGridRowsManager.ResetAddNewRows(Boolean generateNewData)
   at Infragistics.Controls.Grids.RowsManager.InitializeData()
   at Infragistics.Controls.Grids.RowsManager.SetupDataManager()
   at Infragistics.Controls.Grids.RowsManager.EnsureDataManager()
   at Infragistics.Controls.Grids.RowsManager.OnItemsSourceChanged(Boolean invalidateSelectionAndActivation)
   at Infragistics.Controls.Grids.RowsManager.set_ItemsSource(IEnumerable value)
   at Infragistics.Controls.Grids.XamGrid.ApplyItemSource(IEnumerable itemSource)
   at Infragistics.Controls.Grids.XamGrid.ItemsSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Infragistics.Controls.Grids.XamGrid.set_ItemsSource(IEnumerable value)
   at IBV.Modules.ExtendedSearch.ExtendedSearchControl.LoadControl() in C:\DevNet\ExternalAssemblies\ExtendedSearch\ExtendedSearchControl.xaml.cs:line 104

 

Inner Exception Source:

mscorlib

 

Inner Exception Message:

Constructor on type 'System.Data.DataRowView' not found.

 

When the DataSet is empty or the grid does not allow AddNewRow there is no excpetion thrown.

Whats wrong here?