Hi all ,
I am developing an application using MVC 4 . I have a base view with HTML table , it gets populated by MVC controller and displays a list .
There is add button on page , on click of which a dialog box is opened. Dialog box is loaded in a div and a partial view is returned . Something like
This is dialog box definition
$("#IssueDialog").dialog({
autoOpen: false, width: 450, height: 300, modal: true,
buttons: {
"Save": function () {
if ($("#IssueForm").validate().form()) {
$.post("/Issue/Create",
$("#IssueForm").serialize(),
function (data) {
$("#IssueDialog").dialog("close");
$("#lblStatus").text('Issue is saved successfully.');
});
}
},
Cancel: function () { $(this).dialog("close"); }
}
});
This is link click event of add
$("#lnkIssue").click(function () {
$("#IssueDialog").dialog("option", "title", "Add Issues")
.load("/Issue/Create", function () { $("#IssueDialog").dialog("open"); });
});
After save operation is completed in pop up partial view , I am returning page control in controller method as
return RedirectToAction("Index", "Issue");
After this function gets updated data but table is not getting refreshed . Am I missing anything ? is there an explicit way to refresh table in base view after pop up operation is done using Jquery ?
Thanks
Siddhesh