This question is locked. New answers and comments are not allowed.
Hello,
i would like dynamically load partial view that embeds Telerik components.
The components are displayed but i'cant click on interactive button, may be i've a javascript problem.
see the attached project. ASP .NET MVC3 - Razor
Thanks for your help.
Denis
i would like dynamically load partial view that embeds Telerik components.
The components are displayed but i'cant click on interactive button, may be i've a javascript problem.
see the attached project. ASP .NET MVC3 - Razor
Thanks for your help.
Denis
==== Main page =====
@using TelerikDemo.Models
@model EditableData
<
h2
>Demo with numeric </
h2
>
<
p
>
<
a
href
=
"javascript:OnLoadDynamicPanel();"
>Load dynamic view</
a
>
</
p
>
<
div
id
=
"divDynamicPanel"
style
=
"border: 2px solid navy"
;" ></
div
>
<
script
type
=
"text/javascript"
>
function OnLoadDynamicPanel() {
$.ajax({
url: 'Index2',
type: 'GET',
success: function (data) { document.getElementById('divDynamicPanel').innerHTML = data; }
});
}
</
script
>
===== sub view, i want to display on divDynamicPanel =====
@using TelerikDemo.Models
@model EditableData
<
h2
>Dynamic view loaded by ajax request</
h2
>
@Html.EditorFor(m => m.Date) <
span
>click on button doesn't work</
span
>
@(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Combined(true).Compress(true)))
=========== Model ============
public class EditableData
{
[UIHint("Date")]
public DateTime Date {get; set;}
public EditableData(DateTime dt) { Date = dt;}
}
====== Controller ===========
public ActionResult Index()
{
return View();
}
public ActionResult Index2()
{
return PartialView(new EditableData(DateTime.Now));
}