Hi,
I've been using Kendo UI with ASP.NET MVC and am very happy with it.
Still, I'm stuck with an issue:
I have an EditorTemplate which ouputs a Kendo UI DropDownList. As a best practice, I call .Deferred() on every widget I'm using to get all the JS initialization at the bottom of the page.
The issue I'm facing is that this EditorTemplate is used by the grid to build insert and edit popup forms, and in this case the .Deferred() does not work because the intialization script is executed before the grid actually builds the form.
What I'd like to achieve to avoid duplicating the EditorTemplates is to know, at runtime, whether the template is executed from a "normal" page or from a Kendo form builder.
I saw that you create your own HtmlHelper, passing along a GridViewDataContainer, but at runtime I'm always faced with the Html.ViewDataContainer being an instance of WebViewPage.
Do you know if there's a possibility of figuring this out so I can defer the JS scripts when appropriate?
Thanks in advance.
Mickaël Derriey
I've been using Kendo UI with ASP.NET MVC and am very happy with it.
Still, I'm stuck with an issue:
I have an EditorTemplate which ouputs a Kendo UI DropDownList. As a best practice, I call .Deferred() on every widget I'm using to get all the JS initialization at the bottom of the page.
The issue I'm facing is that this EditorTemplate is used by the grid to build insert and edit popup forms, and in this case the .Deferred() does not work because the intialization script is executed before the grid actually builds the form.
What I'd like to achieve to avoid duplicating the EditorTemplates is to know, at runtime, whether the template is executed from a "normal" page or from a Kendo form builder.
I saw that you create your own HtmlHelper, passing along a GridViewDataContainer, but at runtime I'm always faced with the Html.ViewDataContainer being an instance of WebViewPage.
Do you know if there's a possibility of figuring this out so I can defer the JS scripts when appropriate?
Thanks in advance.
Mickaël Derriey