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

Window location is not right

1 Answer 30 Views
Window
This is a migrated thread and some comments may be shown as answers.
Omar
Top achievements
Rank 1
Veteran
Iron
Omar asked on 27 Mar 2021, 03:20 PM

Hi,

I have page with few buttons that is used to open window, if the page is at normal position (that is not scrolled down) the window opens nicely in the center position. If the page is scrolled down even for tiny pit the windows open at the bottom of the page and some times at position I have to scroll down to see it.

 

I have tried the code bellow but it did not work:

var oWnd = radopen('../maps/geoLocationMap.aspx?QID=' + args.get_commandArgument(), "GeoMAPwindow");
 oWnd.center();

 

Regards,

Omar

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 30 Mar 2021, 02:54 PM

Hi Omar,

Can you try setting the CenterIfModal property of RadWindow to true and let me know the result?

https://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/positioning-a-modal-radwindow

For example:

        <telerik:RadWindowManager runat="server" ID="RadWindowManager1">
            <Windows>
                <telerik:RadWindow ID="GeoMAPwindow" runat="server" Modal="true" 
                    Width="600px" Height="400px"
                    CenterIfModal="true">
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>

        <telerik:RadButton ID="ShowBtn" runat="server" AutoPostBack="false" CommandArgument="TestArg"
            OnClientClicked="showWindow" Text="Show Modal Window">
        </telerik:RadButton>
        <script>
            function showWindow(sender, args) {
                var oWnd = radopen('../maps/geoLocationMap.aspx?QID=' + args.get_commandArgument(), "GeoMAPwindow");
                oWnd.center();
            }
        </script>

Regards,
Vessy
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Window
Asked by
Omar
Top achievements
Rank 1
Veteran
Iron
Answers by
Vessy
Telerik team
Share this question
or