Aggregates in Grid

Hi there! Working with aggregations in the Grid in Release mode the grid does not show the data and throws the error:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: This operation is only valid on generic types.
System.InvalidOperationException: This operation is only valid on generic types.
  at System.RuntimeType.GetGenericTypeDefinition () <0x383def8 + 0x0001c> in <filename unknown>:0 
  at Syncfusion.Blazor.Grids.SfGrid`1[TValue].IsObservableCollection (System.Object data) <0x5f1e230 + 0x00016> in <filename unknown>:0 
  at Syncfusion.Blazor.Grids.SfGrid`1[TValue].CollectionDisposeMethod (System.Object data) <0x5f1e1c0 + 0x00006> in <filename unknown>:0 
  at Syncfusion.Blazor.Grids.Internal.GridContent`1[TContent].System.IDisposable.Dispose () <0x5f25e88 + 0x00010> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.Rendering.ComponentState.TryDisposeInBatch (Microsoft.AspNetCore.Components.Rendering.RenderBatchBuilder batchBuilder, System.Exception& exception) <0x41eff60 + 0x0002c> in <filename unknown>:0

It is strange because in debug mode the Grid render the data and shows the Aggregates.
Thanks

3 Replies 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team February 19, 2021 07:13 AM UTC

Hi Adriana,  
 
Thanks for contacting Syncfusion support.  
 
Query: “there! Working with aggregations in the Grid in Release mode the grid does not show the data and throws the error: 
 
We have analyzed the reported query and we understand that you are facing issue in release mode with aggregates. The reported issue might occur when datasource is returned wrongly from server for remote datasource. So kindly share the following details to validate the reported query at our end.  
 
  1. Share the Grid code example.
  2. Share the details about the datasource along with the Adaptor type (in case of remote data)
  3. Share your Syncfusion.Blazor Nuget package version details.
  4. In case of remote data. Have you handled the aggregates in server side.
  5. If possible share a simple issue reproducible sample.
 
Above requested details will be very helpful for us to validate the reported query at our end and provide solution as early as possible.  
 
Regards, 
Vignesh Natarajan  



AS Adriana Selena Tito Ilasaca February 19, 2021 06:18 PM UTC

1. I copied the sample code from Documentation
2. As in the documentation the DataSource comes from a list 
3. Version 18.4.0.42
Just to add in csproj ->  netstandard2.1


VN Vignesh Natarajan Syncfusion Team February 22, 2021 11:13 AM UTC

Hi Adriana,  
 
Thanks for sharing the requested details 
 
Query: “Working with aggregations in the Grid in Release mode the grid does not show the data and throws the error: 
 
We have validated the reported query as per your suggestion and we are able to reproduce the reported issue at our end also. We suggest you to resolve the reported issue by including the below highlighted line in csproj file under PropertyGroup tag.  
 
[BlazorApp1.csproj] 
 
  <PropertyGroup> 
    <TargetFramework>netstandard2.1</TargetFramework> 
    <RazorLangVersion>3.0</RazorLangVersion> 
    <BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking> 
  </PropertyGroup> 
 
Refer the below documentation for your reference 
 
 
Please get back to us if you have further queries. 
 
Regards, 
Vignesh Natarajan   
 


Marked as answer
Loader.
Up arrow icon