[CLOSED] MultiCombo Change Event Not Saving ViewState

Page 2 of 2 FirstFirst 12
  1. #11
    Yes, I'm getting exactly the same behavior which you desire.

    What Ext.Net sources do you use? Could you update from SVN and re-test?
  2. #12
    Hi,

    I think I know what is going wrong. Please change your MultiCombo <Change> event to a <Select> event.

    Example

    <Select OnEvent="MultiCombo_Change" ViewStateMode="Enabled" />
    Let me know if that then causes the TextField properly to be set properly.

    Upgrading from SVN isn't going to make a difference. I was testing with v1.2.
    Geoffrey McGill
    Founder
  3. #13
    Changing the OnEvent from 'Change' to 'Select' did the trick.

    Thanks for the help.

    Rick
  4. #14
    Quote Originally Posted by garrisrd View Post
    Changing the OnEvent from 'Change' to 'Select' did the trick.

    Thanks for the help.

    Rick
    Excellent. Thanks for the update.

    The reason this issue was happening was because of a few reasons:

    1. The MultiCombo <Change> event is not fired until the field looses focus. If you click the trigger button to open the MultiCombo options, selected something(s), then clicked the "Next" Button without first clicking on the Page, or any other element on the Page... the Button <Click> event may be firing before the MultiCombo <Change> event. This created a Race Condition.

    2. If you set .ajaxViewStateMode="Enabled" in the Web.config, both the MultiCombo and Button will send ViewState data back to the server at the same time. For the sample to work correctly, the order in which the server receives this ViewState data is critical (see #1).

    3. We think @daniil was not able to reproduce the issue (at least consistently, now able to reproduce 1/10 times) was for some reason his computer/server/browser/etc and Ext.NET were running VERY efficiently. The result of the MultiCombo <Change> event was responding before the Button <Click> event occurred. This is a sub millisecond response time. This is a good thing, although in @daniil's environment, the MultiCombo was always winning the Race Condition.

    By changing the MultiCombo <Change> event to <Select> the DirectEvent is requested on each item clicked in the MultiCombo. This avoids the race condition.

    Hope this helps.
    Geoffrey McGill
    Founder
  5. #15
    This was mentioned earlier by @daniil, although it's worth mentioning again...

    We would recommend NOT setting .ajaxViewStateMode="Enabled" in the Web.config. In general you shouldn't require ViewState and if you're always sending as part of the Request/Response, you're adding unnecessary bloat to your App. Depending on the size of your App, the ViewState may be crippling.

    Of course everyones situation is different, so use your own best judgement.

    In the upcoming v2 release, ViewState is not only disabled during a DirectEvent (by default), it's not even rendered to the Page on initial load. These settings can be overwritten, although by default we now have no reliance on client rendering of ViewState and personally I haven't run into a scenario where it's required.

    Cheers!
    Geoffrey McGill
    Founder
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: Jul 20, 2013, 7:01 PM
  2. [CLOSED] Editable column on grid: how to raise an event for saving
    By digitek in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 13, 2012, 11:02 AM
  3. Replies: 0
    Last Post: Dec 12, 2011, 2:38 PM
  4. [CLOSED] [1.0] MultiCombo Change listener not working as expected
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Aug 20, 2010, 3:06 PM
  5. How to update viewstate in ajax event?
    By bruce in forum 1.x Help
    Replies: 1
    Last Post: Feb 08, 2009, 11:00 PM

Tags for this Thread

Posting Permissions