hellow,
I have an issue with closing a WebDialogWindow using a JS code.
so for showing the dialog, I'm using the following vb.net code:
WebDialogWindow9.WindowState = Infragistics.Web.UI.LayoutControls.DialogWindowState.Normal
the above code works fine, and inside that dialog there is a button called (Cancel), this button suppose to close/hide the WebDialogWindow9, so I'm using this JS code:
function closeDialogs() { var win = window.parent; var dialog = win.$find('WebDialogWindow9');
if (dialog) { dialog.hide(); } }
========
<igtxt:WebImageButton ID="WebImageButton2" runat="server" Text="Cancel" Width="135px"> <ClientSideEvents Click="closeDialogs" /> <Appearance> <Image Url="./Res/Actions-button-cancel-icon1.png" /> </Appearance> </igtxt:WebImageButton>
but it does nothing when I click on the button? could you please assist me with this.
Thanks again for you support, the thing that the webdialog is linked to another form, as the following:
<ig:WebDialogWindow ID="WebDialogWindow9" runat="server" Height="400px" InitialLocation="Centered" Moveable="False" Width="950px" WindowState="Hidden"> <ContentPane ContentUrl="Test.aspx" ScrollBars="Hidden"> </ContentPane> <Header CaptionText="Test"> </Header> </ig:WebDialogWindow>
And that form (Test.aspx) has couple text inputs and 2 buttons, one for saving data and the other one for canceling the changes, which suppose to close the dialog window.
can this work? as I tried to use JS find the webdialog inside the parent page to close it:
var win = window.parent; var dialog = win.$find('WebDialogWindow9');
this code is inside the "Test.aspx"
another thing, the webdialigwindow9 is inside a WebTab tags in the parent page. If this matters.
thanks again
Hello,
I have created a small sample trying to reproduce the described behavior. I am using WebDialogWindow with version 21.2. On my side everything works as expected and I am able to open/close the dialog by using both show/hide methods and changing the window state. I have tested the sample in Edge, Chrome and Mozilla and there were no issues in all the browsers.
Attached you will find my sample for your reference. Please test it on your side and let me know how it behaves. If this is not an accurate demonstration of what you are trying to achieve, please feel free to modify it and send it back to me along with steps to reproduce
Looking forward to hearing from you.
Regards, Ivan Kitanov
WebDialogWindowShowClose.zip
still having the same issue, no result when I click.
Another alternative to the show/hide methods is setting the windowState property to either Normal or Hidden, so what you could try is changing the code to:
dialog. .set_windowState($IG.DialogWindowState.Hidden);
The use of these properties has been demonstrated in the WebDialogFrame.aspx file in the following sample:
https://www.infragistics.com/samples/aspnet/dialog-window/confirmation-dialog
Please let me know if you need any further assistance.