correct syntax in grid->Advianced->initialisation script

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

correct syntax in grid->Advianced->initialisation script

Post by mrbdrm »

From kendo ui docs there is this configureation :

Code: Select all

noRecords: true
we can use it like this in the initialisation script :

Code: Select all

config.noRecords=true;
now this configuration:

Code: Select all

noRecords: {
    template: "No data available on current page. Current page is: #=this.dataSource.page()#"
  }
how can we use it?

Hope my question is clear
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: correct syntax in grid->Advianced->initialisation script

Post by johntalbott »

Code: Select all

config.noRecords=true;
displays the default template.

In the Init Script, you can create a custom template ...

Code: Select all

config.noRecords = {template: "No data available on current page. Current page is: #=this.dataSource.page()#"};
Note: If you do the custom template, leave out the ...

Code: Select all

config.noRecords=true;
If this is set after setting the custom template, it will display the default template instead of your custom template.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: correct syntax in grid->Advianced->initialisation script

Post by mrbdrm »

Thank you very much
works like a charm :)
Jaymer
Posts: 2451
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Thats a nice hack!

Post by Jaymer »

Screen Shot 2016-03-22 at 1.12.54 AM.png
Screen Shot 2016-03-22 at 1.12.54 AM.png (17.47 KiB) Viewed 5662 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply