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
65
StateChanged event doesn't fire when WebDialogWindow is closed via close button
posted

I have a WebDialogWindow.  When I set the window state with the WindowState property, I get notification of the StateChanged event, yet when I hide the window via the close button, my StateChanged event never gets called.  Is this a bug or am I doing something wrong?  If this isn't enough info to go on I can provide code.

Thanks,

Jeff

  • 24497
    posted

    Hi Jeff,

    I can not explain that. Actually the opposite should happen. If application changed state on server, then no server or client events should be raised. However, if end user changed state of dialog, then after a postback a server event should be raised.

    The only guess I have in order for raised event on server, that you probably change state of dialog on server on a button click, but user also changed state of dialog. So, postback was triggered and state-change event was raised. But that happens not because you have code to change state, but because of postback. If user never changed state of dialog, then change-event should not be raised.

    If you want process state change on server on any change-state of dialog, then you may enable that by

    <AutoPostBackFlags WindowStateChange="On" />

    You also may process ClientEvents.WindowStateChanged and trigger postback conditionally by evtArgs.set_postBack(1);