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

RadConfirmm popup screen always position center

1 Answer 184 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vitaly
Top achievements
Rank 1
Iron
Iron
Vitaly asked on 11 Sep 2019, 01:57 PM

  Hi All,

I have a code in code behind where i am calling RadConfirm popup screen:

RadWindowManager1.RadConfirm("Are you sure you want to Delete interest record(s) and ready to proceed?", "confirmCallbackFn", 300, 180, null, "Confirmation Message");

<script type="text/javascript">

        function confirmCallbackFn(arg) {
            if (arg) //the user clicked OK
            {

                __doPostBack("<%=OkBtn.UniqueID %>", "");



            }
            else {
                __doPostBack("<%=CancelBtn.UniqueID %>", "");
            }
        }

    </script>

when i scroll all the way down and delete the record on the grid and click on link button, popup screen appear but all the way on top instead of the center when i scroll down. When screen is located up it is fine but when i scroll down to lets say delete last record on the screen popup window remains on the top.

Please help.

Thanks so much.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 16 Sep 2019, 08:42 AM

Hello Vitaly,

The RadConfirm and RadAlert are designed to be absolutely positioned and the position is calculated dynamically with JavaScript. 

Based on the provided code, it seems that the RadConfirm shows, and then the page is scrolled by the framework or with some custom code.

What I can suggest is using the OnClientShow event of the RadWindowManager and based on some conditions, to call the .center() method for the confirm dialog so that it is recentered after the automatic scroll happens. 

<script>
    function OnClientShow(sender, args) {
        setTimeout(function () {
            sender.center();
        },100);
    }
</script>

Regards,
Peter Milchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Vitaly
Top achievements
Rank 1
Iron
Iron
Answers by
Peter Milchev
Telerik team
Share this question
or