InvalidCastException when I use a context menu

Hi,

The context menu in SfTreeGrid works perfectly when my DataSource is a list of business objects. But as soon as I use SfDataManager with a custom adaptor I get the following exception when I right-click on an item :

Error: System.InvalidCastException: Unable to cast object of type 'Syncfusion.Blazor.Grids.RowInfo`1[VTFrontendWebApp3.Components.ModuleAssetsBrowser.ABBrowse+Node]' to type 'Syncfusion.Blazor.Grids.RowInfo`1[Syncfusion.Blazor.TreeGrid.Internal.TreeListItem`1[VTFrontendWebApp3.Components.ModuleAssetsBrowser.ABBrowse+Node]]'

Any idea please ?



2 Replies

PS Pon Selva Jeganathan Syncfusion Team September 3, 2024 01:41 PM UTC

Hi Nabil,


Greetings from syncfusion.


We are able to replicate the issue at our end. Upon further validation, we considered the reported issue(Exception thrown when opening the context menu with remote data binding ) as a bug. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and will include the fix in our upcoming Nuget release which is expected to be rolled out on September 24, 2024. Until then we value your patience.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below feedback link, 

  

Feedback link: https://www.syncfusion.com/feedback/60961/script-error-is-thrown-when-opening-the-context-menu-with-remote-data-binding


Note: To view the above feedback, kindly login into your account. 


Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization


Regards,

Pon selva




AG Ajithkumar Gopalakrishnan Syncfusion Team September 26, 2024 11:19 AM UTC

Hi Nabil,

We appreciate your patience.

The issue, "Script error is thrown when opening the context menu with remote data binding" was caused by the update of the TreeListItem, which led to the issue. We are pleased to announce that a fix for this issue has been rolled out in our Nuget release (v27.1.50). Please upgrade to our latest version to resolve the problem.

Sample link: 
https://blazorplayground.syncfusion.com/embed/rNBpNkVxVuaFpouG?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5

Release notes: https://blazor.syncfusion.com/documentation/release-notes/27.1.50?type=all#tree-grid

Contact us if you require any further assistance.

Regards,

Ajithkumar G


Loader.
Up arrow icon