How to show RadWindow on top of RadTabStrip

4 posts, 0 answers
  1. Mahmoud
    Mahmoud avatar
    2 posts
    Member since:
    May 2014

    Posted 19 Jul 2014 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Jul 2014 in reply to Mahmoud Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mahmoud
    Mahmoud avatar
    2 posts
    Member since:
    May 2014

    Posted 21 Jul 2014 in reply to Shinu Link to this post

    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
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 21 Jul 2014 Link to this post

    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.

     
Back to Top