Unplanned
Last Updated: 12 Oct 2021 11:14 by ADMIN
Graeme
Created on: 12 Oct 2021 11:05
Category: Grid
Type: Bug Report
1
NoRecords is showing the default instead of template message in Grid

When using template and no DataSource is set Grid NoRecords message is not rendered.

 

Reproduction of the problem

Define a 'No Records' with template similar to the following article example: https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/templates/no-records

 

@(Html.Kendo().Grid<Grid_Template.Controllers.GridModel>()
    .Name("Grid1")
    .NoRecords(n => n.Template("string HTML template, not centered"))
)

Current behavior

The default message for missing record is displayed: No records available.
"autoBind":false is applied to serialization

 

Expected/desired behavior

The message from the template is displayed: "string HTML template, not centered"

Workaround:
Add .DataSource(d => d.Ajax()) to the Grid configuration

 

 

@(Html.Kendo().Grid<Grid_Template.Controllers.GridModel>()
    .Name("Grid1")
    .NoRecords(n => n.Template("string HTML template, not centered"))
        .DataSource(d => d.Ajax())

)

 

https://github.com/telerik/kendo-ui-core/issues/6598

 

 

0 comments