
Hi,
in the doc under "define a custom No Records message"
http://www.kendoui.io/kendo-ui/aspnet-mvc/helpers/grid/configuration#no-records-template
there is written that I can use .NoRecords("Mystring") but this is not allowed (see Pictures)
and to set it like .NoRecords(n => n.Template("string HTML template, not centered")) is the non-centered method but I want to Center the message...
@(Html.Kendo().Grid<Order>()
.Name(
"Grid"
)
.NoRecords(
"string HTML template, automatically centered"
)
)
9 Answers, 1 is accepted
Could you please let me know which version of Kendo UI you are using? Note that the latest official release allows you to enter an string value for NoRecords attribute. Please check out the attached sample which demonstrates that.
Regards,
Kostadin
Telerik by Progress

I'm using the latest Version 2016.3.128 with ASP.NET MVC Core under VS 2015...
and NoRecords doesn't work (see attached Picture with the error)
robert
Please check out the following video where you can see that on my end I am able to add a string in the NoRecords attribute. Additionally did you try the previously provided sample? I would appreciate if you provide a small runnable sample where the issue could be replicated in order to examine it locally.
I am looking forward to your reply.
Regards,
Kostadin
Telerik by Progress

Hi,
here you can download a sample:http://www.madrian.at/TelerikAspNetCoreTest.zip
(see also Picture attached)
Please excuse me for misleading you but NoRecords accept string only when using MVC5. When using MVC Core you have to use a Template. Keep in mind you can wrap the text in a div or span container and manually center it by using a CSS
Regards,
Kostadin
Telerik by Progress

Hi,
but why are there differences between the MVC 5 and the Core Version and is there a documentation which shows us the differences?
robert
Note that the MVC Core wrappers are consistence with the Kendo widgets where you can add a boolean value or a string template. You can check out the configuration of the grid where the options of the NoRecords are listed. Regards the documentation of the MVC Core you can find it in the following link. We still update the content and some of the information might be missing.
Regards,
Kostadin
Telerik by Progress

The Kendo UI Grid for ASP.NET Core NoRecords is configurable in two ways:
- with a string
- with an external template
https://docs.telerik.com/aspnet-core/api/Kendo.Mvc.UI.Fluent/GridNoRecordsSettingsBuilder
Example:
// string
.NoRecords(norecs=>norecs.Template("You search returned no results"))
// template id
.NoRecords(norecs=>norecs.TemplateId("no-records-template"))
<
script
id
=
"no-records-template"
type
=
"text/x-kendo-template"
>
<
strong
> No records match your search.</
strong
>
</
script
>
Kind Regards,
Alex Hajigeorgieva
Progress Telerik