0
votes

I have created a kendo grid with a checkbox column that when selected will select the row and persist the selected state. Everything works fine however when I apply the OnDataBound event, this function must be declared in a script tag that is above the Kendo() grid. where as the document.ready function must be declared in a script tag at the bottom of the Kendo() grid.

I don't quite understand why that is? I am using ASP.NET MVC 4 with Razor technology.

Thanks

1
You could move the script tags in your layout from the bottom of the page to the top.Jason P
onDatabound has to be on top .. if at the bottom it will be recognized as undefined? I am just curious why that is.nav

1 Answers

0
votes

Some Kendo controls look for their related scripts and if they are not defined at the top of the page, when a page loads sequentially from top to bottom, and the kendo grid loads before the script is loaded and hence it thinks it is not defined. Document.Ready need not be at the top of the page. It could be defined even at the top of the page, but it is not a requirement.