Passing values from parent To child

5 posts, 0 answers
  1. SUBIN
    SUBIN avatar
    8 posts
    Member since:
    Jan 2013

    Posted 15 Feb 2013 Link to this post

    Hello ,
    I am using Telerik Rad Popup window..While clicking the button insdide popup I can pass values to main page(parent)
      String value = "Subin","Sebastian"
                    { ClientScript.RegisterStartupScript(this.GetType(), "closewin", "CloseWin('" + value + "');", true); }
    Is there any option to pass values from parent to child
    I mean while clicking any button inside Main page(parent ),i wanna pass values to popup window...
  2. SUBIN
    SUBIN avatar
    8 posts
    Member since:
    Jan 2013

    Posted 18 Feb 2013 Link to this post

    Hello ,
    I am using Telerik Rad Popup window..While clicking the button insdide popup I can pass values to main page(parent)
      String value = "Subin","Sebastian"
                    { ClientScript.RegisterStartupScript(this.GetType(), "closewin", "CloseWin('" + value + "');", true); }
    Is there any option to pass values from parent to child
    I mean while clicking any button inside Main page(parent ),i wanna pass values to popup window.

    please provide a solution asap
  3. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 Feb 2013 Link to this post

    Hi,

    One suggestion is that you can set the DataKeyNames and pass the value as shown below.
    C#:
    void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                string value = item.GetDataKeyValue("ID").ToString();
                Button img = (Button)item.FindControl("Button1");
               btn.OnClientClick = "OnClientClick(" + value + ");return false";
            }
    }
    JS:
    function OnClientClick(value)
    {
            window.radopen("Page.aspx?ID=" +value, null);
     
    }

    Thanks,
    Princy
  4. SUBIN
    SUBIN avatar
    8 posts
    Member since:
    Jan 2013

    Posted 18 Feb 2013 Link to this post

    Hellow,
    On click am using this code only
      Webform1.VisibleOnPageLoad = true;
    then how can i pass value
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Feb 2013 Link to this post

    Hi,

    Setting the VisibleOnPageLoad property causes the RadWindow to appear on each postback. You can access the Button and open RadWindow using the above mentioned approach. Also you can use the server side approach for opening RadWindow as shown below.
    C#:
    protected void Button1_Click(object sender, EventArgs e)
       {
           string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
           ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
       }

    Thanks,
    Shinu
Back to Top