Server Sided Problems with more Windows added dynamicly

5 posts, 0 answers
  1. Marek
    Marek  avatar
    4 posts
    Member since:
    Jul 2008

    Posted 21 Nov 2009 Link to this post

    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

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Nov 2009 Link to this post

    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.
  3. Marek
    Marek  avatar
    4 posts
    Member since:
    Jul 2008

    Posted 26 Nov 2009 Link to this post

    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

  4. Marek
    Marek  avatar
    4 posts
    Member since:
    Jul 2008

    Posted 26 Nov 2009 Link to this post

    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



  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 26 Nov 2009 Link to this post

    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.
Back to Top