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

Dynamic RadWindow within RadPageView

3 Answers 114 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
MarkSci
Top achievements
Rank 1
MarkSci asked on 27 Mar 2013, 02:39 PM
Hi everyone,

I am dynamically creating a static radWindow to appear on a RadPageView within a RadMultipage. The code which creates the radWindow is done entirely within the code-behind, and I am using an AJAX manager.

it all works fine and my RadWindow appears and is displayed where I want it (within a div called "RegistrationFileContainer" which is also within an ASP Panel control which I've hooked up to the AJAX Manager). 

However when I click on the other tabs, the radWindow remains in front of the other tabs.

I'm sure there is something simple which I am doing wrong. I've attached my markup code below (the code behind simply creates the window and then adds it to the RegistrationFileContainer Div).

<!-- Pages -->
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage">
 
    <!-- Registration Information -->
    <telerik:RadPageView ID="RadPageView1" runat="server">
 
        <asp:Panel runat="server" id="PanelRegistration" CssClass="PagePanel" >
            <div class="RegistrationFileContainer" runat="server" id="RegistrationFileContainer" />
        </asp:Panel>
            
    </telerik:RadPageView>
 
</telerik:RadMultiPage>

Can anybody help?

Thanks!

Mark

3 Answers, 1 is accepted

Sort by
0
MasterChiefMasterChef
Top achievements
Rank 2
answered on 27 Mar 2013, 03:15 PM
Hi Mark,

There is a good chance the radWindow's z-index is keeping it visible in your page. You may want to become familiar with RadControls default z-indexes. Each control has a set z-index, and controls with higher z-indexes will appear on top of others. There is a short demo on the Telerik website explaining this concept, here:
http://www.telerik.com/support/kb/aspnet-ajax/window/show-radwindow-above-radmenu.aspx

Good luck,
Master Chief
0
MarkSci
Top achievements
Rank 1
answered on 27 Mar 2013, 03:26 PM
Good guess Master Chief but no luck. Actually the z-Index property occurred to me too but I followed through with your suggestion and the same behaviour occurs. If you think about it logically, the z-Index shouldn't really come into play because the dynamic controls are added to the RadPageView and then subsequently the RadMultipage should handle the visibility of those controls when a different tab is selected.

My thinking is this is more to do with binding the RadWindow to the RadPageView (and for some reason the standard container.controls.add(radWindow) isn't working. I thought this article might help, but there is no 'owner' property for a RadWindow in ASP.NET.

Any other ideas...?
0
Accepted
Nencho
Telerik team
answered on 28 Mar 2013, 02:49 PM
Hello Mark,

I can suggest you to explicitly close the RadWindow at the OnClientTabSelecting client-side event of the RadTabStrip, regarding the RadTab, where the Window is nested in. Consider the following approach:

<script type="text/javascript">
        function OnClientTabSelecting(sender, args) {
            if (args.get_tab().get_text() != "Tab 2") {
                GetRadWindowManager().getWindowByName('RadWindow1').close();
            }
        }
    </script>

The above suggestion is implemented, assuming that there is a RadWindowManager on the page. If there is none, you could simply access the RadWindow in the following manner :
$find("RadWindow1").close();




All the best,
Nencho
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
TabStrip
Asked by
MarkSci
Top achievements
Rank 1
Answers by
MasterChiefMasterChef
Top achievements
Rank 2
MarkSci
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or