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

Groupheadertemplate error

1 Answer 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bert
Top achievements
Rank 1
Veteran
Bert asked on 07 Jan 2021, 10:07 AM

Hi,

i followed the next example to do serialization of the datasourcerequest on the server:

https://github.com/telerik/blazor-ui/tree/master/grid/datasourcerequest-on-server

when I try to combine this with the grid aggregates, I get this runtime error:

crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Number of parameters specified does not match the expected number.
System.Reflection.TargetParameterCountException: Number of parameters specified does not match the expected number.
   at System.Reflection.RuntimeMethodInfo.ConvertValues(Binder binder, Object[] args, ParameterInfo[] pinfo, CultureInfo culture, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at Telerik.DataSource.AggregateFunctionsGroup.<>c__DisplayClass8_0.<ExtractPropertyValues>b__0(PropertyInfo p)
   at System.Linq.Utilities.<>c__DisplayClass2_0`3[[System.Reflection.PropertyInfo, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[<>f__AnonymousType0`2[[System.Reflection.PropertyInfo, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Telerik.DataSource, Version=2.0.7.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8],[<>f__AnonymousType1`2[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Telerik.DataSource, Version=2.0.7.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8]].<CombineSelectors>b__0(PropertyInfo x)
   at System.Linq.Enumerable.SelectArrayIterator`2[[System.Reflection.PropertyInfo, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[<>f__AnonymousType1`2[[System.String, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Telerik.DataSource, Version=2.0.7.0, Culture=neutral, PublicKeyToken=20b4b0547069c4f8]].MoveNext()
   at System.Linq.Enumerable.ToDictionary[<>f__AnonymousType1`2,String,Object](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[<>f__AnonymousType1`2,String,Object](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at Telerik.DataSource.AggregateFunctionsGroup.ExtractPropertyValues(Object obj)
   at Telerik.DataSource.AggregateFunctionsGroup.get_Aggregates()
   at Telerik.Blazor.Components.Grid.Grouping.GroupHeaderCell`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].GetColumnGroupHeaderTemplateArgs()
   at Telerik.Blazor.Components.Grid.Grouping.GroupHeaderCell`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].BuildRenderTree(RenderTreeBuilder __builder)
   at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

 

 

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Jan 2021, 12:43 PM

Hello Bert,

At the moment, the framework cannot deserialize interfaces, which causes a problem, you can Follow its status here: https://feedback.telerik.com/blazor/1495388-allow-serializing-and-deserializing-grid-aggregates-with-server-grouping.

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Bert
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Share this question
or