Overblog Follow this blog
Edit post Administration Create my blog
Balavardhan Reddy Narani

How to access Parent Window Control in Child Window

March 9 2009 , Written by Balavardhan Published on #ASP.Net

Access Control which is in Parent Data grid/Grid View in Child Window.

Bind the Data Grid Control with Data and call a PopUp Window from any one item in that to fill the control of Data Grid which is in particular row.

by clicking on the Get Remarks, Remarks text box will filed from the popup.

For that
Step 1 :
when ever you are binding Data to Data Grid, you need to bind the Get Remarks as a column to the Data Grid and you need to pass the control ID to Popup to fill, Datagrid_DataBound Event.

index += 1;
if (index < 10)
remarks_index = "0" + index.ToString();
remarks_index = index.ToString();

when bind data if the Item count is less than 10 you need to add "0" in front.

Step 2 :

string ctlname = "CriteriaDG_ctl" + remarks_index+ "_RemarksTextBox";

e.Item.Cells["index of Get Remarks"].Text = @""+"Get Remarks"+@"";

by the above code when ever you are binding Data to Data grid it can add the anchor tag to column which has get remarks to call the popup and send control name as query string.

step 3:

in the Popup window by using of
opener.document.getElementById("passed control name").value = "<value what you need to send";

Share this post

Repost 0
To be informed of the latest articles, subscribe:

Comment on this post