none
How to force getEnable for a Ribbon combobox RRS feed

  • Question

  • I have two Ribbon comboboxes. If a user selects certain values from combo1, I need to enable or disable combo2.

    For example:

    <comboBox id="combo1" label="One:" getEnabled="EnabledState" onChange="Combo1_Click" ... /> 
    <comboBox id="combo2" label="Two:" getEnabled="EnabledState" onChange="Combo2_Click" ... />
    

    The Combo1_Click event sets a (global) Boolean value about whether combo2 should be enabled or disabled. At that point, I need to force combo2 to call getEnabled so that it can check for and return the correct enabled state.

    How can I do this?


    Thursday, July 28, 2011 3:29 PM

Answers

  • Answer:  After I set the global Boolean, I simply call InvalidateControl("Combo2") from the Combo1_Click method.  Works beautifully!
    • Marked as answer by Anonymous9748 Thursday, July 28, 2011 3:39 PM
    Thursday, July 28, 2011 3:39 PM

All replies

  • Answer:  After I set the global Boolean, I simply call InvalidateControl("Combo2") from the Combo1_Click method.  Works beautifully!
    • Marked as answer by Anonymous9748 Thursday, July 28, 2011 3:39 PM
    Thursday, July 28, 2011 3:39 PM
  • Hi Anoymous,

    I'm glad to see you have solved the problem by yourself and thanks for sharing your expeirence here.

    Have a nice day,


    Best Regards, Calvin Gao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 1, 2011 2:52 AM
    Moderator