<div id="editor"> @*@Html.Partial("_ClientForm", Model) *@ <p id ="PlaceHolder"> </p> </div>And in the Edit button code I have this
function edit(com, grid) { $('.trSelected', grid).each(function () { var id = $(this).attr('id'); id = id.substring(id.lastIndexOf('row') + 3); currentId = id; $('#fntype').val('Edit'); var url = '/Client/Edit/' + id; // var url = "/Home/About/"; // $("#sform").load(url).dialog({ modal: true, width: 1200, height: 750, resizable: true, close: function (event, ui) { alert('Closed'); } }); // var url = "~/Controllers/Test.html"; $('#PlaceHolder').dialog({ autoOpen: false, width: 1200, height:750, close: function (event, ui) { alert('Closed'); }, resizable: true, modal: true, open: function (event, ui) { $(this).load(url); }, }); $('#PlaceHolder').dialog('open'); }); }However, nothing happens when I click the edit button and the dialog does not come up at all. If I uncomment that commented line in the Client page and use the form instead of the p, it works, but I have other issues.