locked
How to refresh combobox after its itemsource has been changed RRS feed

  • Question

  • Hi,

    I use ComboBox whose itemsource is set to a dictionary. The code is

    SortedDictionary<string, TagInfo> tagInfoDictionary
    radComboBox_TagKey.ItemsSource = tagInfoDictionary.Keys

    But after tagInfoDictionary  is changed, ComboBox does not update its list items. How to update ComboBox after change?

    Thanks,

    York


    York

    Tuesday, January 15, 2013 5:05 AM

Answers

  • Hi

    you  have to assign again and refresh items as below:

    radComboBox_TagKey.ItemsSource = tagInfoDictionary.Keys

    radComboBox_TagKey.Items.Refresh();


    Sincerely, dhampall Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Lisa Zhu Wednesday, January 16, 2013 12:36 PM
    • Marked as answer by york Z Friday, January 18, 2013 8:41 AM
    Tuesday, January 15, 2013 8:18 AM