This is a migrated thread and some comments may be shown as answers.

Rad Window Disappears

2 Answers 118 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 2
Stefan asked on 16 May 2013, 04:47 PM
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?

Thanks

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 May 2013, 04:59 AM
Hi,

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

Thanks,
Princy.
0
Marin Bratanov
Telerik team
answered on 17 May 2013, 10:28 AM
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.
Tags
Window
Asked by
Stefan
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or