Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
The webDialogWindow goes wild
posted

Hi all,

 I try to fix the webDialogWindow  in a specific area in my web page, but I didn't find how to do that.

I want the webDialogWindow continues to move in the web page, but not everywhere (example: not on my menu toolbar)

Is it possible??

Because I try many things, even create a master page to put my other controls and keep an empty webpage just for my WebDialogWindow and put this page in my master page.

I'm lost

 Thank you

 -Gabriel

Parents
  • 24497
    Verified Answer
    posted

    Hi Gabriel,

    Unfortunately WebDialogWindow does not have properties which restrict its movement on client. In order to prevent moving dialog to specific areas on screen, the ClientEvents.Moving should be used. Below is example:

    <script type="text/javascript">
    function dialogMoving(dialog, evtArgs)
    {
     
    var x = evtArgs.get_x(), y = evtArgs.get_y();
     
    if(x < 200 || x > 700 || y < 100 || y > 400)
        evtArgs.set_cancel(
    true);
    }
    </script>

    <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Width="200px" Height="200px" Left="300px" Top="200px">
     
    <ClientEvents Moving="dialogMoving"></ClientEvents>
    </ig:WebDialogWindow>

Reply Children