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
410
Event to fire on web dialog window show method?
posted

Hello,

 I'd like to run some code in my ASP.NET code-behind when my web dialog window is shown.  The WindowsState of it is hidden.  I'm then showing it with the following BLOCKED SCRIPT

$find('incSection1_myWebDialog').show();

 

I have break point on the sub declaration in an event handler defined in my pages code behind that I'm not seeing get hit:

     Protected Sub stateChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.LayoutControls.DialogWindowStateChangedEventArgs) Handles myWebDialog.StateChanged

    End Sub
 

When does the StateChanged get fired?  I have breakpoints on event handlers for the .Init and .PreRender events of my web dialog window and I see them get hit when my page is first loaded.

 -Eric

Parents
No Data
Reply
  • 24497
    posted

    Hi Eric,

    Autopostback happens only on action of user. If you call a member function of WebDialogWindow, then corresponding event on client and on server is not raised. Some member functions have extra flag, which allows to raise event (like on user action). Below is example for window state:

    <script type="text/javascript">
    function showAndSubmit()
    {
     
    var dialog = $find("WebDialogWindow1");
      dialog.set_windowState($IG.DialogWindowState.Normal,
    true);
    }
    </script>

    <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="100px" WindowState="Hidden"
    onstatechanged="WebDialogWindow1_StateChanged" Width="300px" >
       
    <AutoPostBackFlags WindowStateChange="On"></AutoPostBackFlags>
    </ig:WebDialogWindow>
    <input id="Button1" type="button" value="ShowAndSubmit" onclick="showAndSubmit()" />

Children