This question is locked. New answers and comments are not allowed.
Hi all,
I added <% Html.Telerik().ScriptRegistrar().Render(); %> to the end of my master page as requested by Telerik document.
I have a page to use the master page, inside the page a partial view is embedded, and inside the partial view I have some condition to determine a Grid control to show or not.
Some code samples are:
From view I have <% Html.RenderPartial("MyPartialView", new MyViewModel()); %>
From MyPartialView.ascx I have:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyViewModel>" %>
<%
if (Model.SomeValue == true) {
%>
<% Html.Telerik().Grid(Model.Lists)
.Name("Lists")
.Columns(columns =>
{
columns.Bound(g => g.Name).Title("Name");
})
.Footer(false)
.Resizable(resizing => resizing.Columns(true))
.Render();
%>
<%
}
%>
When I run the page, I could not see Telerik().ScriptRegistrar() will render <script type="text/javascript" src="/Scripts/2010.3.1318/telerik.grid.min.js"></script> in my Html page. Thus some of my client side function could not be performed.
Any idea what shall I do in this situation?
Thanks
Hardy
I added <% Html.Telerik().ScriptRegistrar().Render(); %> to the end of my master page as requested by Telerik document.
I have a page to use the master page, inside the page a partial view is embedded, and inside the partial view I have some condition to determine a Grid control to show or not.
Some code samples are:
From view I have <% Html.RenderPartial("MyPartialView", new MyViewModel()); %>
From MyPartialView.ascx I have:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyViewModel>" %>
<%
if (Model.SomeValue == true) {
%>
<% Html.Telerik().Grid(Model.Lists)
.Name("Lists")
.Columns(columns =>
{
columns.Bound(g => g.Name).Title("Name");
})
.Footer(false)
.Resizable(resizing => resizing.Columns(true))
.Render();
%>
<%
}
%>
When I run the page, I could not see Telerik().ScriptRegistrar() will render <script type="text/javascript" src="/Scripts/2010.3.1318/telerik.grid.min.js"></script> in my Html page. Thus some of my client side function could not be performed.
Any idea what shall I do in this situation?
Thanks
Hardy
