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

Server Sided Problems with more Windows added dynamicly

4 Answers 74 Views
Window
This is a migrated thread and some comments may be shown as answers.
Marek
Top achievements
Rank 1
Marek asked on 21 Nov 2009, 03:51 PM
Dear Telerik,

i had a problem using server sided dynamic radwindow opening.

Scenario: We have a RadMenu. If i click on an menu Item a dynamicly added window should shown. The RadMenu updates the RadWindowManager through Ajax using RadAjaxManager.

At first, here are some relevant code in the aspx file:

Registring componetes in RadAjax Manager:
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="MainMenu"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="WindowManager" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

RadMenu and WindowManager:
 <div id="menuDiv"
     <telerik:RadMenu ID="MainMenu" runat="server" OnItemClick="RadMenuOnItemClick" Width="100%" /> 
</div>  
    
<div id="windowZone" runat="server"></div>  
<telerik:RadWindowManager ID="WindowManager" EnableViewState="true" runat="server"  RestrictionZoneID="windowZone" ></telerik:RadWindowManager> 
    

The RadMenuItems added in code behind. Here is the function called if an item clicked
 protected void RadMenuOnItemClick(object sender, RadMenuEventArgs e) 
        { 
            switch (e.Item.Value)  
            { 
                case "wima_wiki"
                    RadWindow rw = new RadWindow(); 
                    rw.Title = "Test"
                    rw.ID = "testwin1"
                    rw.VisibleOnPageLoad = true
                    rw.Width = 500; 
                    rw.Height = 500; 
                    WindowManager.Windows.Add(rw); 
                     
                    break
                case "wiki_bookmarks"
                    RadWindow rww = new RadWindow(); 
                    rww.Title = "Test2"
                    rww.ID = "testwin2"
                    rww.VisibleOnPageLoad = true
                    rww.Width = 500; 
                    rww.Height = 500; 
                    WindowManager.Windows.Add(rww); 
                     
                    break
            } 


If i click on one Item, the window appears dynamicly without a page reload. Great! But when i clicked on an other menu item, the second window appears, but the first window disappears.
I need all opened windows should stay open unless you realy want to close them.

I tried to set following window manager properties on page_load:
WindowManager.DestroyOnClose = true
WindowManager.EnableViewState = true
WindowManager.RegisterWithScriptManager = true
WindowManager.PreserveClientState = true
            
The windows still close if i open another, but the position of the windows stayes the same as befor.

What i must do that the windows doesent close when i open another? Must i save the window collection into state?

Thanking you in anticipation

Best regard
Marek Schmidt

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 26 Nov 2009, 07:59 AM
Hi Marek ,

Are you using the latest version of the controls? I tried your code with it and everything is working as expected (see attached movie).



Regards,
Georgi Tunev
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.
0
Marek
Top achievements
Rank 1
answered on 26 Nov 2009, 10:30 AM
Hi Georgi ,

thank you for your reply!

I update my Q2 SP1 to the newer release Q3 and this problem is gone :-)

Thank you
Best regards Marek

0
Marek
Top achievements
Rank 1
answered on 26 Nov 2009, 12:08 PM
Hi Georgi,

it testet now the server-side opening methods and i still have some problems. I do the ajaxcall through the RadAjaxManager same as in the post berfore. The AjaxCall happens, (i see it also at an loading panel i added which appears), but after that loading panel disappears, the browsercontent flickers and the radwindows reloads theire content and jump from default to last "moveto" position.
I need that the content stays the same (like when i added a new windows through client-sided radwindow functions).

What can i do to avoid those reloads and flickerings ?

Also i have problems destroying the windows. When i close them, they comes back again after a new window opened. How can I remove them from the WindowCollection? Must i use client side functions to really kill them out of the windowcollection?

Best regards
Marek Schmidt



0
Georgi Tunev
Telerik team
answered on 26 Nov 2009, 01:07 PM
Hello again Marek ,

Please open a support ticket and send us your application or a small sample one that reproduces the problem. We will check it and do our best to help.



Sincerely yours,
Georgi Tunev
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
Marek
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Marek
Top achievements
Rank 1
Share this question
or