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
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>
Works great, thank you
A+ for the service.
Hello Gabriel,
I think what you are looking for is the setSize method, off the WebDailogWindow main object. It is documented here.
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR3.5/html/WebDialogWindow~Infragistics.Web.UI.WebDialogWindow~setSize.html
In essence, your code may need to be changed to something like this:
if(x>615||y>123) { WebDialogWindow1.setSize(615, 123);
}
Its me again,
I have another request, now I want to maximize the WebDialogWindow in the limits (x=615 and y=123) .
I try this function:
function dialogTransforme(WebDialogWindow1, evtArgs) { var x=evtArgs.get_width(), y=evtArgs.get_height(); if(x>615||y>123) { evtArgs.set_width()=615; evtArgs.set_height()=123; } }
<ClientEvents Moving="dialogMoving" WindowStateChanged="dialogTransforme"> </ClientEvents>
thank you