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

Multiple RadWindows Opening at Server Side

3 Answers 118 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tanuja
Top achievements
Rank 1
Tanuja asked on 20 Oct 2008, 07:40 AM
Hi,
I have One Treeview controle and one radwindow manger.
Treeview is binding on pageload dynamically. when i am clicking on first node of treeview it should show window. If am selecting another node it should display another window in window manager object. So finally if i select 5 nodes 5 windows should display but it's displaying only one winodw. Please provide the solution for this.

 

protected void rdTreeNodes_NodeClick(object sender, RadTreeNodeEventArgs e)

 

{

 

string strNodeName= e.Node.Text;

 

 

RadWindow strNode = new RadWindow();

 

strNode.ID = strNodeName;

strNode.RestrictionZoneID = divZone.ID;

strNode.Top =

Unit.Pixel(30);

 

strNode.NavigateUrl =

"http://mysite/mypage.aspx";

 

strNode.VisibleOnPageLoad =

true;

 

RadWindowManager1.Windows.Add(strNode);

 

 

}


Thanks in advance..
by
Tanuja Ramesh

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 22 Oct 2008, 01:26 PM
Hi Tanuja,

This behavior (showing only one window) is expected and is not directly related to the RadWindow control itself.

Basically what you do is to create a new control every time a button is clicked - you will face the same task if you are creating a standard asp:label for example. What you need to do is to store the number of created controls and re-create them every time you click on the treeview / button.



Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Asma
Top achievements
Rank 1
answered on 24 Jan 2012, 09:14 AM
even m facing the same issue..i have a page which has around 4 usercontrols each holding a radgrid
these usercontrols load radwindow on add & edit click

now each time on the page when we click on any usercontrol radgrid it just loads only one radwindow of 1 usercontrol not different ones corresponding to different radgrids

could you please give a detailed example for the solution
0
Marin Bratanov
Telerik team
answered on 25 Jan 2012, 04:23 PM
Hello Asma,

I advise that you start off by examining this thread on the correct way to open a RadWindow from the server: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx. Once you are familiar with the approach you can simply use AJAX - dispose only the grid by placing it in an UpdatePanel with UpdateMode set to Conditional. From the code-behind you can inject a script (or simply a call to a function by passing the needed URL). This function can open a RadWindow. The different ways to open a RadWindow is explained in this article: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html. The easiest way is to have a RadWindowManager on the main page and simply calling radopen(). Thus the JavaScritp function you will call from the code-behind can also be on the main page, or it can be declared for each UC. How to use functions in UCs so that their names are unique (in order not to override each other) is explained in this KB article: http://www.telerik.com/support/kb/aspnet-ajax/general/using-dynamic-unique-names-for-javascript-functions.aspx. I am also attaching a simple project that shows the approach in action.


Greetings,
Marin
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
Tanuja
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Asma
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or