This is a migrated thread and some comments may be shown as answers.

Group Scrolling

1 Answer 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott Rakestraw
Top achievements
Rank 1
Scott Rakestraw asked on 23 Nov 2009, 05:53 PM
When I have row virtualization turned on and I group on a column that enables a scroll bar I get the following error when I scroll through it.  I am binding to a component one silverlight datatable.  When I turn of row virtualization this error never happens.

Message: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.InvalidOperationException: Cannot change ObservableCollection during a CollectionChanged or PropertyChanged event.
   at System.Collections.ObjectModel.ObservableCollection`1.CheckReentrancy()
   at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
   at Telerik.Windows.Data.RadObservableCollection`1.ClearItems()
   at Telerik.Windows.Data.ObservableItemCollection`1.ClearItems()
   at System.Collections.ObjectModel.Collection`1.Clear()
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target)
   at Telerik.Windows.Data.CollectionHelper.Synchronize(NotifyCollectionChangedEventArgs e, IEnumerable source, IList target)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewFilterDescriptorsCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
   at Telerik.Windows.Data.RadObservableCollection`1.ClearItems()
   at Telerik.Windows.Data.ObservableItemCollection`1.ClearItems()
   at System.Collections.ObjectModel.Collection`1.Clear()
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target)
   at Telerik.Windows.Data.CollectionHelper.Synchronize(NotifyCollectionChangedEventArgs e, IEnumerable source, IList target)
   at Telerik.Windows.Data.DataItemCollection.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
   at Telerik.Windows.Data.RadObservableCollection`1.ClearItems()
   at Telerik.Windows.Data.ObservableItemCollection`1.ClearItems()
   at System.Collections.ObjectModel.Collection`1.Clear()
   at Telerik.Windows.Data.DataItemCollection.set_CollectionView(QueryableCollectionView value)
   at Telerik.Windows.Data.DataItemCollection.ClearItemsSource()
   at Telerik.Windows.Controls.GridView.GridViewGroupRow.OnItemsSourceChanged(Object oldValue, Object newValue)
   at Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args)
   at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)
   at System.Windows.DependencyObject.ClearValueInternal(DependencyProperty dp)
   at System.Windows.DependencyObject.ClearValue(DependencyProperty dp)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ClearContainerForGroupOverride(DependencyObject element, Object item)
   at Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.ClearContainerForItem(DependencyObject container, Object item)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.UnlinkContainerFromItem(DependencyObject container, Object item, Boolean isRecycled)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.Remove(GeneratorPosition position, Int32 count, Boolean isRecycling)
   at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IRecyclingItemContainerGenerator.Recycle(GeneratorPosition position, Int32 count)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.CleanupRange(IList children, IItemContainerGenerator generator, Int32 startIndex, Int32 count)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.CleanupContainers(Int32 firstViewport, BaseItemsControl itemsControl)
   at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 26 Nov 2009, 12:56 PM
Hello Scott Rakestraw,

What version are you using? We believe that this issue has been resolved with our Latest Internal Build (from November 20th). Can you try with this build and see whether the exception will go away. In case it does not, please drop us a line.

Greetings,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Scott Rakestraw
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or