New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Common Issues

This article provides solutions for common issues you might encounter while working with the Telerik UI Grid component for ASP.NET Core.

Grid Performs HTTP GET Requests instead of POST

By default, the Grid makes POST requests when configured for Ajax data binding. This is implemented by a custom DataSource transport and schema, defined in the kendo.aspnetmvc.min.js script file.

Solution: Make sure the kendo.aspnetmvc.min.js file is included after the kendo.all.min.js file. For more information, refer to the required client-side resources article.

The following example demonstrates the correct order of required Kendo UI script files.

HTML
<script src="~/lib/kendo-ui/js/kendo.all.min.js"></script>
<script src="~/lib/kendo-ui/js/kendo.aspnetmvc.min.js"></script>

Ajax-Bound Grid Does Not Populate

The causes of this issue are various.

Solution

  1. Use your browser developer console to check for any JavaScript errors. In most browsers pressing F12 displays the developer console. Address all JavaScript errors.

  2. Check the Network—or Net in Firebug—tab of the browser developer console. Look for a failed HTTP request for the action method configured via the DataSource Grid setting.

    • HTTP status code 401 indicates that the required authentication has failed or has not been provided yet.
    • HTTP status code 403 indicates that the request is not authorized. Perhaps the current user does not have the required permissions.
    • HTTP status code 404 indicates that the requested URL cannot be found. Check if the controller and action names are spelled correctly.
    • HTTP status code 500 indicates that a server error occurred while processing the request. Check what the server response is. In most cases, it will contain the full .NET stacktrace. If the reason for the exception is not clear, put a break-point in the action method and break with the debugger. Also, refer to the article on well-known exceptions.
  3. Check if you are using the ToDataSourceResult extension method. That method returns the data in the JSON format expected by the Grid.

Grid Fails to Update Dates and Numbers When Current Culture Is Not en-US

Make sure the respective culture script file included (for example, kendo.culture.es-ES.min.js). For more information, refer to the globalization documentation.

"X" DataSource Configuration Option Is Not Available

Not all settings of the DataSource are exposed through the DataSource fluent API.

Solution: To gain full control over the DataSource, consider using the Custom() DataSource fluent API.

Grid Fires Create Action instead of Update Action

If an ID value is not specified for a given data item, the DataSource of the Grid treats it as a new data item and calls the Create action.

Solution: Define the Id option in the Model() configuration of the DataSource to ensure the Create, Update, and Destroy operations work correctly. The specified Id field acts as an identifier of the Model.

Razor
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()    
    .Name("grid")    
    ... // Additional configuration.
    .DataSource(dataSource => dataSource        
        .Ajax()         
        .Model(model => model.Id(p => p.ProductID))
        ...
    )
)

Grid Does Not Display Numbers and Dates in the Correct Culture Format

By default, the Grid formats dates and numbers using the en-US culture.

If the Grid does not display the numbers and dates in a format that matches the server-side culture of the application, update the client-side culture to match the server-side culture, as described in the globalization documentation.

See Also