locked
Combobox selecteditemChenged by UserInterface or binded value? RRS feed

  • Question

  • Hello there.

       I think the question is self explainable, but, i have some combobox that makes some code in the selectedIndexChanged event

    what i want to know in that event is if the changing event was provoked by user input or the selection has changed from the binded value.

    thanks,  

    Jorge

       


    -- Jorge_M_P

    • Moved by CoolDadTx Thursday, December 18, 2014 3:15 PM Winforms related
    Thursday, December 18, 2014 2:52 PM

Answers

  • There is no way to tell what caused the index to change. If you have a specific scenario where you don't want to do some work then you'll need to disable it. You can do that by removing the handler before binding and then adding it back when you're done although there are other approaches as well.

    Michael Taylor
    http://blogs.msmvps.com/p3net

    • Proposed as answer by Magnus (MM8)MVP Thursday, December 18, 2014 3:17 PM
    • Marked as answer by Carl Cai Thursday, December 25, 2014 10:21 AM
    Thursday, December 18, 2014 3:15 PM