Asp.Net Core (.Net5) kendo grid data binding not working

0 Answers 280 Views
Grid
Shuzo
Top achievements
Rank 1
Shuzo asked on 10 Mar 2022, 09:40 AM

I am trying to use kendo grid in asp.net core (.net5) web application but data is not visible in grid I guess binding is not working.

Kendo grid is able make read data request to action method and also able to get result back but that result is not being bound to grid and I am not sure what is going wrong in here.

 

I have attached the sample project here.

Can someone help me find the issue? 

 

Shuzo
Top achievements
Rank 1
commented on 11 Mar 2022, 12:52 AM

Nevermind. I found the issue 

Had to configure json serializer 

services.AddControllersWithViews()

.AddJsonOptions(options =>
            {
                options.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
                options.JsonSerializerOptions.PropertyNamingPolicy = null;
            });

 
Tsvetomir
Telerik team
commented on 14 Mar 2022, 12:36 PM

Indeed, the binding issue is related to the JSON serialization. If you would like to change the naming policy for a single ActionMethod instead of the whole application, I could recommend the third point in the following article:

https://docs.telerik.com/aspnet-core/compatibility/json-serialization#configure-json-serialization-in-aspnet-core-3-and-later

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Shuzo
Top achievements
Rank 1
Share this question
or