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

Multiple Rad windows under single Radwindow Manager

3 Answers 410 Views
Window
This is a migrated thread and some comments may be shown as answers.
satya r
Top achievements
Rank 1
satya r asked on 13 Sep 2009, 10:55 PM
I have a situation where I am defining mutliple Radwindows under Radwindow Manager.

<Rad windowmanager  id = RdManager1 >

<windows>
<radwindow1 id = rdwindoweasy> </radwindow>
<radwindow1 id = rdwindowhard> </radwindow>
</windows>
</radwindowmanager>

Here I want to set the radwindow size individually for each windows..But when I set so its not applying...It applies to all whn I set to radwindow manager.Please any suggestions on how do I set the radwindow size..i do not want to set it dynamically.



3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Sep 2009, 07:17 AM
Hello Satya,

I tried setting the height and width of individual windows in the RadWindowManager as shown below. Did you try setting it the same way? If not try this code and let me know if it helps:
aspx:
<telerik:RadWindowManager ID="RdManager1" runat="server"
  <Windows> 
    <telerik:RadWindow ID="rdwindoweasy" Height="200px" Width="500px"  runat="server"
    </telerik:RadWindow> 
    <telerik:RadWindow ID="rdwindowhard" Height="500px" Width="1000px" runat="server"
    </telerik:RadWindow> 
  </Windows> 
</telerik:RadWindowManager> 

You can also make use of the RadWindow Collection Editor for RadWindowManager objects which will help you add, remove and configure the windows of a RadWindowManager control. Check out the following document to find out more on this:
RadWindow Collection Editor

Thanks
Princy.
0
satya r
Top achievements
Rank 1
answered on 14 Sep 2009, 01:50 PM
ya I did exactly the same way as u mentioned.But thats my issue..It does not works..How about adding a separate radwindow manager for each radwindows? ..does that work?
0
Fiko
Telerik team
answered on 16 Sep 2009, 01:55 PM
Hi Satya,

I assume that you are using several RadWindowManagers on the same page. If this is so, please note that by design, all of the RadWindowManager's functions - radopen, radalert, radconfirm, , etc. will always use the RadWindowManager that is first rendered on the page. In scenarios like yours, I recommend you customize the RadWindows after it is opened by using its client-side API. For example you can set the window's size like this :
 
<script language="javascript" type="text/javascript">  
    function openWindow(val, wndName)  
    {  
        var ownd = window.radopen(val, wndName);  
        ownd.setSize(500, 500);  
        ownd.center();  
        return false;  
    }  
</script> 

There are three possible scenarios for the radopen function:
  • if the RadWindow with the same ID already exist (the second parameter of the function) on the page, then that window will be open
  • if the RadWindow with passed ID does not exist on the page, then a new RadWindow will be created with that ID. The new window has the default values, set in the RadWindowManager's declaration.
  • if you pass the "null" value to the ID parameter of the radopen() function, then a new RadWiindow will be created every time when you call that function. A random generator will be used in order to assign unique ID for every opened RadWindow.

As an alternative you can use this approach :

function openChat()  
{  
    var oRadWindowManager = $find("<%= RadManager1.ClientID %>");  
    var oWindow = oRadWindowManager.open(URL"rdwindoweasy");  

In the code above we found the right RadWindowManager object and then open the window that is declared inside it with the properties set in its declaration.


I hope that the helps.


Kind regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
satya r
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
satya r
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or