GridView and DomainCollectionView

1 posts, 0 answers
  1. Adrian Pay
    Adrian Pay avatar
    28 posts
    Member since:
    Nov 2009

    Posted 09 Apr 2012 Link to this post

    I am using telerik GridView in the view layer and binding it to the DomainCollectionView, but unfortually I keep getting the following exception, I have read many blogs about this, especially this link: http://www.silverlightshow.net/items/Working-with-collections-in-WCF-RIA-Services-part-two.aspx , I have pulled off many of my hairs, but still got no idea, anyone can help me on this: 

    An exception of type 'System.InvalidOperationException' occurred and was caught.
    --------------------------------------------------------------------------------
    04/09/2012 13:00:05
    Type : System.InvalidOperationException, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
    Message : [CollectionView_NoAccessWhileChangesAreDeferred]
    Arguments: 
    Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.1.10111.0&File=System.Windows.dll&Key=CollectionView_NoAccessWhileChangesAreDeferred
    Data : System.Collections.ListDictionaryInternal
    Stack Trace :    at System.Windows.Data.CollectionView.VerifyRefreshNotDeferred()
       at System.Windows.Data.CollectionView.get_CurrentItem()
       at Microsoft.Windows.Data.DomainServices.CollectionViewWrapper.get_CurrentItem()
       at Telerik.Windows.Data.DataItemCollection.UpdateSourceCollectionCurrentItem()
       at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<System.EventArgs>.ReceiveWeakEvent(Object sender, EventArgs args)
       at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
       at Telerik.Windows.Data.QueryableCollectionView.OnCurrentChanged(EventArgs args)
       at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
       at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
       at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
       at Telerik.Windows.Data.QueryableCollectionView.OnGroupDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
       at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
       at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
       at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
       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.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
       at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
       at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
       at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
       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.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
       at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
       at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
       at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
       at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
       at System.Collections.ObjectModel.Collection`1.Clear()
       at Microsoft.Windows.Data.DomainServices.DomainCollectionView.CopyGroupDescriptions(ObservableCollection`1 from, ObservableCollection`1 to)
       at Microsoft.Windows.Data.DomainServices.DomainCollectionView.SyncToWrappedGroupDescriptions()
       at Microsoft.Windows.Data.DomainServices.DomainCollectionView.SyncToWrappedValues()
       at Microsoft.Windows.Data.DomainServices.DomainCollectionView.OnLoadCompleted(Object sender, AsyncCompletedEventArgs e)
       at Microsoft.Windows.Data.DomainServices.CollectionViewLoader.OnLoadCompleted(AsyncCompletedEventArgs e)
       at Microsoft.Windows.Data.DomainServices.DomainCollectionViewLoader.OnLoadCompleted(Object sender, EventArgs e)
       at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
       at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
       at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
       at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )

    Thanks so much.
Back to Top