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

[Solved] ResumeNotifications() error

4 Answers 113 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rama
Top achievements
Rank 1
Rama asked on 13 Aug 2010, 04:50 PM
Hi,
   I am getting "NullReferenceException" error when it hits "ResumeNotifications()" line. This is how the error occurs:
I open the form that has the grid. I click on the scroll bar to scroll up or down. Then I close the form and open the same form again and it shows the error. If i do not use scroll bar then there is no error. Here is my code:

client.ListCompleted += (s, args) =>
            {
                client.CloseAsync();
               this.lst.SuspendNotifications();
                this.lst.Clear();
                this.lst.AddRange(args.Result.lst);
                this.lst.ResumeNotifications(); 
                this.lstView.SetIsLoading(false);
                this.lstView.Refresh();
                this.lstView.CollectionChanged += lstView_CollectionChanged;
            };

Thanks.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 16 Aug 2010, 06:32 AM
Hello,

 Can you post the exception stack trace?

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rama
Top achievements
Rank 1
answered on 16 Aug 2010, 01:40 PM
Hi Vlad,
    Here is the stack trace:

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  StackTrace:
 at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   at System.Windows.UIElement.UpdateLayout()
   at Telerik.Windows.Controls.GridView.GridViewDataControl.ItemsSourceChanged(Boolean sourceChanged)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(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 Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshInternal()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.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 Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at myAPP.ViewModel.Financials.myData.MV.MVCViewModel.<>c__DisplayClass13.<ShowDetails>b__12(Object s, GetmyListCompletedEventArgs args)
   at myAPP.myDataService.myDataServiceClient.OnGetmyListCompleted(Object state)

Thanks.
0
Rama
Top achievements
Rank 1
answered on 18 Aug 2010, 07:09 PM
Hi,
    I am still waiting for your reponse.

Thanks.
0
Vlad
Telerik team
answered on 19 Aug 2010, 06:04 AM
Hello,

 Unfortunately we were unable to reproduce such exception. If this is our latest version (Q2 2010 SP1) please open support ticket and send us small project where we can reproduce and debug the issue. 

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Rama
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Rama
Top achievements
Rank 1
Share this question
or