Edit this page

Cannot Get Any Data to Load in Grid

Environment

Product Progress Kendo UI Grid for ASP.NET Core
Operating System All
Browser All
.Net framework Version 1 0

Description

When the Grid data is sent from the Controller to the client and I cannot get any records to load in any of the grids in my ASP.NET Core project. What is the cause and how can I handle this issues?

Cause

By default, the data in .NET Core is serialized in camelCase, while the property names in the Model are usually in PascalCase. As a result, in this scenario the DataSource of the Grid does not recognize the fields in the data that is returned by the server.

Solution

Edit the ConfigureServices method in the Startup.cs.

    public void ConfigureServices(IServiceCollection services)
    {
        ...
        // Maintain property names during serialization. See:
        // https://github.com/aspnet/Announcements/issues/194
        services
            .AddMvc()
            .AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver());

        // Add Kendo UI services to the services container
        services.AddKendo();
    }

See Also

Getting Started with Telerik UI for ASP.NET Core

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy