System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Syncfusion.SfDataGrid.XForms.Droid.PagerScrollViewRenderer'.

When back to previous page through backbutton raise this error. Could someone help me?
It's seems that this error is caused by this property of SfDataPager:

                PageSize

is this property bindable?


thanks.


2 Replies

DY Deivaselvan Y Syncfusion Team August 29, 2018 06:04 PM UTC

Hi Vinicius,

Thank you for contacting Syncfusion support.

Regarding your first query:

The exception while navigating back to the previous page could not be reproduced on our side. Can you please provide us the below details in which scenario does the exception occurs?

Have you used any MVVM frameworks such as FreshMVVM, MVVMLight or MVVMCross in it?

Have you manually disposed any property?

Regarding your second query:

Yes. SfDataPager.PageSize is a bindable property.

We have attached the sample in which we have tested the issue and you can download the same sample from below link.

Sample link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/SfGrid_Sample-1467650073

Regards,
Deivaselvan 



VI Vinicius August 29, 2018 06:37 PM UTC

Have you used any MVVM frameworks such as FreshMVVM, MVVMLight or MVVMCross in it?

Yes. I've use FreshMVVM.

Can you please provide us the below details in which scenario does the exception occurs?

I'm using SfDataGrid combined with SfDataPager, binding by x:Reference SfDataGrid.ItemsSource to SfDataPager.PagedSource as sample code bellow:

<sfgrid:SfDataGrid ItemsSource="{Binding Source={x:Reference Name=dataPager}, Path=PagedSource}"  PageSize="{Binding PageSize}" />

and, on my ViewModel there is an bindable property called PageSize, that is set with a value that came from my webservice.

after page is loaded and pageSize viewModel property is set, so when i clicked on backbutton, to return my previous page the error is raised(ps. it's not need interact with nothing on the page, the simple fact to enter on the page and leave, the error is raised.

I've confirmed that error is caused by PageSize="{Binding PageSize}" because when, this attribute is defined with a fixed value or through control property in code behind nothing wrong happens.

Have you manually disposed any property?

No, I haven't did nothing manually. (at least this dispose process,have been done automatically, by some third part solutions(like FreshMVVM for exemple).

Now I will check out the attached sample code. If notice something that can causing this issue, I will update this thread.








Loader.
Up arrow icon