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

Cannot select entry in TreeGrid

I have copied your example for 'Self-Referential data binding/Flat Data' from

https://blazor.syncfusion.com/documentation/treegrid/data-binding

...into a Maui Hybrid project and when I click on any element in the TreeGrid, I get an error as below:

(Blazor Version 20.4.0.42)

       Object of type 'System.Collections.Generic.List`1[System.Dynamic.ExpandoObject]' cannot be converted to type 'System.Collections.Generic.List`1[aeRclGoogleAnalytics.GA4Reports+BusinessObject]'.

   at System.RuntimeType.CheckValue(Object& value, ParameterCopyBackAction& copyBack, Binder binder, CultureInfo culture, BindingFlags invokeAttr)

   at System.Reflection.MethodBase.CheckArguments(Span`1 copyOfParameters, IntPtr* byrefParameters, Span`1 shouldCopyBack, ReadOnlySpan`1 parameters, RuntimeType[] sigTypes, Binder binder, CultureInfo culture, BindingFlags invokeAttr)

   at System.Reflection.RuntimeMethodInfo.InvokeOneParameter(Object obj, BindingFlags invokeAttr, Binder binder, Object parameter, CultureInfo culture)

   at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)

   at System.Reflection.PropertyInfo.SetValue(Object obj, Object value)

   at Syncfusion.Blazor.TreeGrid.Internal.TreeGridutils`1.ConvertToTreeGridArgs(Object gridArgs, Object treeGridArgs, SfTreeGrid`1 parent)

   at Syncfusion.Blazor.TreeGrid.Internal.GridRenderer`1.RowSelectingHandler(RowSelectingEventArgs`1 gridArgs)

   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

   at Syncfusion.Blazor.Grids.Internal.Selection`1.SelectByRow(Row`1 rowToSelect, MouseAndKeyArgs evt)

   at Syncfusion.Blazor.Grids.Internal.Selection`1.ValidateRowSelectionClick(Row`1 row, MouseAndKeyArgs e)

   at Syncfusion.Blazor.Grids.Internal.Selection`1.RowSelectionClickHandler(MouseAndKeyArgs e, ValueTuple`3 target)

   at Syncfusion.Blazor.Grids.Internal.Selection`1.ClickHandler(MouseEventArgs e, ValueTuple`3 target)

   at Syncfusion.Blazor.Grids.Internal.GridCellBase`1.CellClickHandler(MouseEventArgs e, Boolean IsCheckBox)

   at Syncfusion.Blazor.TreeGrid.Internal.TreeCell`2.<BuildRenderTree>b__0_5(MouseEventArgs e)

   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)


1 Reply

PS Pon Selva Jeganathan Syncfusion Team January 10, 2023 01:56 PM UTC

Hi Mike,


Query: Script error thrown while clicking on the element


This reported issue is already known issue and it has been fixed in our latest version. So, we suggest you upgrade to the latest version(20.4.43) to resolve the problem.


Please refer to the release notes,

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


Kindly get back to us for further assistance.


Regards,

Pon selva


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly



Loader.
Live Chat Icon For mobile
Up arrow icon