We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Exception for Unhandled exception rendering component: Cannot access a disposed object

Hi Support,

When I switch the two menu program (the two Page all with the TreeView Compoment and others compoments),

Work fine video for Blazor Server, but exception for

Attach zip with my two debug videos.

Please kindly help!



Attachment: 2_Debug_consol_Video_705a4a6d.zip

5 Replies

SS Sivakumar ShunmugaSundaram Syncfusion Team October 14, 2022 08:29 AM

Hi Jacky,

Greetings from syncfusion support.

We understand that you are facing an issue with implementing the Blazor TreeView component. We have prepared a simple sample of the Blazor TreeView component. But we are unable to replicate the reported issue from our side. We suspect that the reported issue occurs due to an incorrect field value being mapped in your application.

We have attached the prepared sample for your reference. Please check the shared sample and compare the shared sample with your sample.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp1426199868.zip

If the issue still persists from your side, share us the code snippets or else replicate the issue in the shared sample. It will help us to provide a prompt solution.


Sivakumar S

JA Jacky October 17, 2022 05:13 AM

Hi  Sivakumar,

Thanks for your help. 

Your Simple sample work fine, but I think mycode is more complex (two treeview control for dragdrop to maintain DB data), and it's difficult to direct share full code to you with db certification .

I check the  field value being mapped is correct.

It's strange when I set OnInitializedAsync() call the two TreeView get datasource at the same time will exception , but remark Initial call the RightTree datasource by button call get datasource will ok.



SS Sivakumar ShunmugaSundaram Syncfusion Team October 18, 2022 03:38 AM

Hi Jacky,

From the shared details in your update, we understand that you are facing an issue with the Blazor TreeView component while initializing data. The reported issue only occurs while returning empty data to the TreeView component after using the await call in OnInitializedAsync from your side.

To overcome the issue, we suggest you set the valid data source to TreeView from your side. We have handled similar issues before. Please check the below link for reference.

Link: https://www.syncfusion.com/forums/150582/nullreferenceexception-when-populating-in-oninitializedasync?reply=NYPcKV

Please check the shared details and get back to us if you need any further assistance.


Sivakumar S

JA Jacky October 18, 2022 04:58 AM

Hi Sivakumar,

That's just great, Thank you for support again!

Best Regards!


IL Indhumathy Loganathan Syncfusion Team October 19, 2022 01:32 AM

Hi Jacky,

We are glad that your reported query has been resolved. Please get back to us if you need any further assistance.


Indhumathy L

Live Chat Icon For mobile
Up arrow icon