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?
Nevermind. I found the issue
Had to configure json serializer
services.AddControllersWithViews()
.AddJsonOptions(options =>
{
options.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
options.JsonSerializerOptions.PropertyNamingPolicy = null;
});
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