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:
RadMenu and WindowManager:
The RadMenuItems added in code behind. Here is the function called if an item clicked
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:
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
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; |
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