This question is locked. New answers and comments are not allowed.
I am using the script registrar in the master page and it correctly loads the scripts and the code to register the controls within the page.
My problem is when I load content via ajax. Since the master page doesn't know about the control when the page loads, the scripts and code for the control never gets loaded. That is to be expected. However, when the content gets loaded, I want it to content just the setup code for the control within the ajax request.
I tried adding the following within my ajax view.
Solution?
My problem is when I load content via ajax. Since the master page doesn't know about the control when the page loads, the scripts and code for the control never gets loaded. That is to be expected. However, when the content gets loaded, I want it to content just the setup code for the control within the ajax request.
I tried adding the following within my ajax view.
@MvcHtmlString.Create(HttpUtility.HtmlDecode(Html.Telerik().ScriptRegistrar().ToHtmlString()))I expected the ScriptRegistrar load all the required scripts and setup code for the control, but it doesn't.
@(Html.Telerik().Grid<Nop.Core.Domain.Catalog.ProductCategory>(Model.CurrentProducts)
.Name("Grid")
.DataKeys(keys => keys.Add(c => c.Id))
.ToolBar(commands => commands.Insert().ImageHtmlAttributes(new { style =
"margin-left:0" }))
.DataBinding(dataBinding =>
{
dataBinding.Ajax()
.Insert("List", "Category")
.Enabled(true);
})
.Columns(columns =>
{
columns.Bound(x => x.Id);
columns.Bound(p => p.IsFeaturedProduct).Width(210);
})
.Editable(editing => editing.Mode(GridEditMode.InLine))
.Pageable()
.Sortable())
Solution?