Hello,
I have the following markup (not that autopostbackflags for WindowStateChange is on):
<asp:ScriptManager ID="ScriptManager1" runat="server" /><cc1:WebDialogWindow ID="MyPopup" runat="server" Height="600px" Modal="True" Width="800px" MaintainLocationOnScroll="True" BorderStyle="Inset" BorderWidth="2px" WindowState="Hidden" InitialLocation="Centered"> <AutoPostBackFlags WindowStateChange="On" /> <Header Visible="false"> </Header> <ContentPane ScrollBars="Hidden"> <Template> <table width="100%" height="100%" id="myTable"> <tbody id="myTBody"> <tr> <td> <uc6:MyUserControl ID="thisIsMyUserControl" runat="server" /> </td> </tr> </tbody> </table> </Template> </ContentPane></cc1:WebDialogWindow>
I then have a javascript function that gets triggered by a link on my page to show my webdialog box:
function ShowMyPopup(cand_id) { $find('MyPopup').show(); //Show My popup}
I then have an event handler that I'm expecting to see fire (but it's not):
Protected Sub MyPopup_StateChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.LayoutControls.DialogWindowStateChangedEventArgs) Handles MyPopup.StateChanged dosomethingtopopulatemywebdialog() 'Never hit this one, but I see the webdialogwindow appear on my screen End Sub
fwiw the pre_render does fire when my page is loaded:
Protected Sub attachmentPopup_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyPopup.PreRender dosomething() 'Hit this one when the page is loaded End Sub
I created both event handlers using the properties Pane in design view. I've done a Ctrl+F5 several times on my page. Any idea why I'm not seeing the event fire?
Thanks,
Eric
I changed the syntax of my Javascript a little bit and see it fire now. I replaced the .show() method, which displays the webdialog, but doesn't fire the event to:
var dialog = $find('myPopup'); dialog.set_windowState($IG.DialogWindowState.Normal, true); //Show the popup