Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid NoRecords message is not rendered when using template and no DataSource is set #6598

Closed
mparvanov opened this issue Oct 12, 2021 · 0 comments
Assignees

Comments

@mparvanov
Copy link
Contributor

mparvanov commented Oct 12, 2021

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())

)

Environment

  • Kendo UI version: 2021.3.914

Ticket ID: 1538737

https://feedback.telerik.com/aspnet-mvc/1538907-no-records-showing-default-instead-of-template-in-grid

@kendo-bot kendo-bot added the FP: Unplanned Sync status with associated Feedback Item label Oct 12, 2021
@gyankov gyankov self-assigned this Mar 22, 2023
@github-actions github-actions bot added FP: Planned Sync status with associated Feedback Item FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item FP: Planned Sync status with associated Feedback Item labels Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants