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
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.
I hope you could help me to pass this problem.
Thanks
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:
- how to determine whether you are in a frame so that you can know what logic to execute: http://www.telerik.com/help/aspnet-ajax/window-application-is-page-in-radwindow.html.
- how to access the main page and execute different logic: http://www.telerik.com/help/aspnet-ajax/window-application-alert-for-entire-page.html.
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,
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.