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

How to show RadWindow on top of RadTabStrip

3 Answers 126 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mahmoud
Top achievements
Rank 1
Mahmoud asked on 19 Jul 2014, 10:55 AM
I've RadTabStrip that opens RadWindow inside its content. But when the window opened, It only moves inside the tab.
I'd like to make the window moves all over the page. I need it to shown up on the middle of the whole page.

See Attachement.

Thanks

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 21 Jul 2014, 06:24 AM
Hi Mahmoud,

Please try the below sample code snippet which works fine at my end.

ASPX:
<telerik:RadGrid ID="rgridOrders" runat="server" DataSourceID="sqldsOrders" Skin="Metro">
</telerik:RadGrid>
<asp:SqlDataSource ID="sqldsOrders" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
    SelectCommand="SELECT top 20 [OrderID], [CustomerID] FROM [Orders]"></asp:SqlDataSource>
<telerik:RadTabStrip ID="rtabDemoPages" runat="server" MultiPageID="rmultipageWindow"
    Skin="Metro">
    <Tabs>
        <telerik:RadTab Text="Tab1" PageViewID="rpageviewWindow">
        </telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="rmultipageWindow" runat="server">
    <telerik:RadPageView ID="rpageviewWindow" runat="server">
        <telerik:RadWindow ID="rwindowDemo" runat="server" OpenerElementID="rtabDemoPages"
            Skin="Metro">
            <ContentTemplate>
                This is an Example Page
            </ContentTemplate>
        </telerik:RadWindow>
    </telerik:RadPageView>
</telerik:RadMultiPage>

Please provide your code if it doesn't help.
Thanks,
Shinu.
0
Mahmoud
Top achievements
Rank 1
answered on 21 Jul 2014, 06:52 AM
Thanks for your help. This example works good. But the problem with me is that the content of RadWindow is not set by ContentTemplate but it is set by ContentUrl, So OpenerElementID doesn't work with me :(

I hope you could help me to pass this problem.


Thanks
0
Marin Bratanov
Telerik team
answered on 21 Jul 2014, 11:26 AM

Hi Mahmoud,

This behavior is not coming from the RadWindow or the way it loads its content, but from the way the content in your PageView is loaded. You seem to be using its ContentUrl so it has its own context (window and document objects) because it gets loaded in an iframe. The RadWindow, being HTML defined in the iframe, cannot violate its boundaries (this is a browser feature - limiting the content of iframes inside the frames).

The following help articles treat similar cases:

What you can do is to open the RadWindow from the parent page, e..g:

window.parent.radopen(url, wndName);

where radopen(url, wndName); assumes the place of the current opening logic. You can see various ways to open a RadWindow here: http://www.telerik.com/help/aspnet-ajax/window-programming-opening.html. You can put the opening logic in a dedicated function and call that instead

Note that this requires the following:

  • the presence of a RadWindowManager or the desired RadWindow on the main page
  • if the RadWindow has handlers, they must be in the cotnext of the main page, because this is where it is defined.

I hope this explains the situation.


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Window
Asked by
Mahmoud
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mahmoud
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or