How can I implement a two-way bound ComboBox with an "Add New" option?
I have a ComboBox that I would like to bind to a property on my class.
However, I would like to intercept the binding process when the first item
in my ComboBox is selected.
The reason is because I have populated my ComboBox with a list of
selectable values. However, I would like for my first item in the list to
be an "Add New..." option. When the user selects "Add New...", I want to
display a new record entry screen that the user can use to add an
additional option to the ComboBox. Once the user creates the new record,
the record will be selected from within my ComboBox.
I imagine this is a scenario that has been encountered numerous times
before. Basically, I want to databind a ComboBox but give my user's the
ability to add options and update the list within the ComboBox.
What is the correct way to do this?
No comments:
Post a Comment