1. I have a
GridView
in a Parent page and the same
GridView
in a
ModalDialog
as Child page.
2. On a button click from parent page with the below
javaScript
I will be opening the required child
ModalDialog
.
var returnValue = window.showModalDialog(url, "windows Arguements #1", "dialogHeight: 700px; dialogWidth: 1100px; scroll: No; edge: Raised; center: Yes; resizable: No; titlebar=No; toolbar=No; status: Yes;");
3. Here in
ModalDialog
page I may edit the values in the
GridView
or I may add new
Rows or
Delete the existing rows, and the same will be saved using save button, by clicking which I will be calling the below
javaScript
window.returnValue = rowscount + "::~~::~~::~~::" + document.getElementById('<%= ChildGridviewID.ClientID %>').outerHTML;
4. On closing the child
ModalDialog
it continues the
javaScript
after the step mentioned in
"Step : 2" as below :
var params = returnValue.split("::~~::~~::~~::");
var rowscount = params[0];
var outer = params[1];
debugger;
document.getElementById(ParentGridviewID).outerHTML = outer;
Which updates the edited values in the
TextBox
,
DropDown
template fields but doesnot reflect the any newly added or deleted rows .