Sunil
Sunil

Reputation: 21416

Position radalert next to button that opens it

I have a master page with RadWindowManager in it.

In a child page, there are multiple buttons. On clicking each a radalert message pops up, but it shows in center of page and I would like to show it to immediate right of the button.

How would I make sure that radalert popup shows to immediate right of the clicked button? Bottom of radalert should align with bottom of clicked button.

Upvotes: 1

Views: 838

Answers (1)

rdmptn
rdmptn

Reputation: 5611

Use JavaScript to move the dialog when you open it. Something like:

<asp:Button ID="Button1" Text="open RA" OnClientClick="openRA(this); return false;" runat="server" />
<script type="text/javascript">
    function openRA(btn)
    {
        var oAlert = radalert("message");
        var btnPos = $telerik.getBounds(btn);
        oAlert.moveTo(btnPos.x + btnPos.width, btnPos.y - oAlert.getWindowBounds().height);
    }
</script>

Upvotes: 1

Related Questions