This is a migrated thread and some comments may be shown as answers.

No Records message wrong documentation?

9 Answers 225 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Robert Madrian asked on 18 Nov 2016, 10:06 AM

 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

Sort by
0
Kostadin
Telerik team
answered on 22 Nov 2016, 08:51 AM
Hi Robert,

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
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 22 Nov 2016, 01:37 PM

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

0
Kostadin
Telerik team
answered on 24 Nov 2016, 09:50 AM
Hi 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
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 24 Nov 2016, 10:13 AM

Hi,

here you can download a sample:http://www.madrian.at/TelerikAspNetCoreTest.zip
(see also Picture attached)

 

0
Kostadin
Telerik team
answered on 28 Nov 2016, 08:08 AM
Hello Robert,

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
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
0
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
answered on 28 Nov 2016, 08:11 AM

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

0
Kostadin
Telerik team
answered on 30 Nov 2016, 07:38 AM
Hello 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
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
0
David Rhodes
Top achievements
Rank 1
answered on 17 Sep 2018, 08:48 AM
Is there any documentation showing how to add the template in the .net core version?
0
Alex Hajigeorgieva
Telerik team
answered on 19 Sep 2018, 10:03 AM
Hi, David,

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
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
Answers by
Kostadin
Telerik team
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
David Rhodes
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Share this question
or