Rad Window Disappears

3 posts, 0 answers
  1. Stefan
    Stefan avatar
    58 posts
    Member since:
    Jan 2013

    Posted 16 May 2013 Link to this post

    I have an image and when I click on it a rad window appears.  Inside the rad window I have a button and a radgrid.  I click the button to populate the radgrid and then the rad window disappears (while populating the the radgrid??).  I have to click on the image again to reshow the rad window and now the grid appears with all its data.  How can I make the rad window stay visible while populating the radgrid?  I have the HideEvent set to ManualClose but it does not seem to matter.  The rad window still disappears while populating the grid.  Can I reshow the rad window after the grid loads maybe?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 May 2013 Link to this post


    Try to set 'VisibleOnPageLoad' property of RadWindow as true to reshow the window.
    protected void button_Click(object sender, EventArgs e)
          SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ToString());
          SqlDataAdapter adapter = new SqlDataAdapter("SELECT * FROM Employee", con);
          DataTable dt = new DataTable();
          Radgrid1.DataSource = dt;
          RadWindow1.VisibleOnPageLoad = true;

  3. Marin Bratanov
    Marin Bratanov avatar
    5454 posts

    Posted 17 May 2013 Link to this post

    Hi guys,

    The problem is most likely coming from the fact that the button is causing a postback and RadWindow, being rendered entirely on the client, cannot survive through a full postback (or a partial one that will dispose it).

    So, my advise is to use partial postbacks as advised here: http://www.telerik.com/help/aspnet-ajax/radwindow-ajaxifying.html.

    In case you want to show it from the code-behind I would advise examining this sticky thread on the subject: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx.

    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top