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
790
XamGrid Bug
posted

Hello,

I have a content presenter, which using a templateSelector decides if i want to show a XamGrid or another control.

My XamGrid has validation, when i want to add a row with not valid data, and than trying to change the DataContext and the ItemsSource of the XamGriw (without exiting adding new row), i get the following exception:

{"Exception has been thrown by the target of an invocation."}

with stacktrace:

at Infragistics.Controls.Grids.XamGrid.ExitCellFromEditModeInternalRow(Boolean cancel)
at Infragistics.Controls.Grids.XamGrid.ExitEditModeInternal(Boolean cancel)
at Infragistics.Controls.Grids.XamGrid.ExitEditMode(Boolean cancel)
at Infragistics.Controls.Grids.RowsManager.InvalidateFiltering()
at Infragistics.Controls.Grids.RowsManager.InvalidateData()
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)

Can you help me how to solve this problem?

Parents
  • 27093
    posted

    Hello Michael, 

    I have been reading through your description and am not quite sure what might be causing this issue, so I was wondering if you have tried this without the TemplateSelector and if you have a project I can look at that reproduces this? 

    Looking forward to hearing from you.

Reply Children