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

Syncfusion Blazor Datagrid Issues with Sorting & Paging

Environment Setup
• Visual Studio 19 Version 16.2.0 Preview 1.0
• .Net Core SDK: . 3.0.100-preview5-011568
• .Net Core Runtime: Microsoft.NETCore.App 3.0.0-preview5-27626-15
• Microsoft.AspNetCore.Blazor 3.0.0-preview5-19227-01
• Syncfusion.EJ2.AspNet.Core.RazorComponents
When I click on one of the grid headings an exception is fired and the grids has the spinning blue circle displayed. The grid becomes unresponsive.
Screenshot of Grid

Exception message in Chrome console:

Uncaught (in promise) Error: System.InvalidOperationException: No generic method 'OrderBy' on type 'System.Linq.Queryable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.

at System.Linq.Expressions.Expression.FindMethod (System.Type type, System.String methodName, System.Type[] typeArgs, System.Linq.Expressions.Expression[] args, System.Reflection.BindingFlags flags) <0x337f998 + 0x00130> in <170a42f892b5459ba3640ba5f7d6f074>:0

at System.Linq.Expressions.Expression.Call (System.Type type, System.String methodName, System.Type[] typeArguments, System.Linq.Expressions.Expression[] arguments) <0x337f6a8 + 0x0004a> in <170a42f892b5459ba3640ba5f7d6f074>:0

at Syncfusion.EJ2.RazorComponents.QueryableExtensions.OrderBy (System.Linq.IQueryable source, System.String propertyName, System.Type sourceType) <0x3379dc8 + 0x000ba> in :0

at Syncfusion.EJ2.RazorComponents.EnumerableOperation.PerformSorting (System.Collections.IEnumerable dataSource, System.Collections.Generic.List`1[T] sortedColumns) <0x33787a8 + 0x0009e> in :0

at Syncfusion.EJ2.RazorComponents.EnumerableOperation.PerformSorting (System.Collections.IEnumerable dataSource, System.Collections.Generic.List`1[T] sortedColumns) <0x32a89b0 + 0x0013c> in :0

at Syncfusion.EJ2.RazorComponents.DataOperations.PerformSorting (System.Collections.IEnumerable dataSource, System.Collections.Generic.List`1[T] sortedColumns) <0x32a8138 + 0x00008> in :0

at Syncfusion.EJ2.RazorComponents.BaseComponent.DataProcess (Syncfusion.EJ2.RazorComponents.DataManagerRequest dm) <0x31cdbf0 + 0x0017a> in :0

at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)

at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x227da48 + 0x000d2> in :0

--- End of stack trace from previous location where exception was thrown ---

at Microsoft.JSInterop.DotNetDispatcher.InvokeSynchronously (System.String assemblyName, System.String methodIdentifier, System.Object targetInstance, System.String argsJson) <0x2cf6160 + 0x00222> in <8f8c03446dbf45f5bbcb1e109a064f6e>:0

at Microsoft.JSInterop.DotNetDispatcher.BeginInvoke (System.String callId, System.String assemblyName, System.String methodIdentifier, System.Int64 dotNetObjectId, System.String argsJson) <0x2cf3220 + 0x0007c> in <8f8c03446dbf45f5bbcb1e109a064f6e>:0

at endInvokeDotNetFromJS (http://localhost:51059/_framework/blazor.webassembly.js:1:6160)

at Object.invokeJSFromDotNet (http://localhost:51059/_framework/blazor.webassembly.js:1:5676)

at _mono_wasm_invoke_js_marshalled (http://localhost:51059/_framework/wasm/mono.js:1:169574)

at wasm-function[1450]:714

at wasm-function[601]:22743

at wasm-function[601]:21413

at wasm-function[601]:21902

at wasm-function[601]:21413

at wasm-function[601]:21413

at wasm-function[601]:21413

The razor file is attached as a zip file.

Attachment: Index_181a554c.zip

3 Replies

CH Chris June 16, 2019 04:51 AM UTC

Attached is the complete solution for above issue.

Attachment: GridEditSortPaging_a4bc6a53.zip

GS Gurupriyadharshini Sankaranarayanan Syncfusion Team June 17, 2019 05:09 AM UTC

Hi Chris, 
Thanks for contacting Syncfusion support. 
We have checked your reported issue in our side and this is not a Grid component issue. [Blazor] IL Linker not working properly, it may be the cause of an issue.  

We suggest you to disable the IL Linker which is present in your .csproj file. Please refer the following code snippet. 

    .  .  .  . 

Please refer the following link for more information: https://github.com/mono/mono/issues/12917   

For your convenience we have modified your sample where we have disabled the IL Linker. Please refer the below sample link. 

Please get back to us for further assistance. 
Gurupriyadharshini S. 

CH Chris June 17, 2019 10:48 AM UTC

Thanks Gurupriyadharshini for looking into this for me. No way I would have been able to work it out.

The VS Blazor template used when you create new s Blazor client app must include IL Linker. I have no idea what IL Linker is so will have to do some google searching to see what it's about. 



Live Chat Icon For mobile
Up arrow icon