Posted 5 July 2018, 12:43 am EST
Hi,
I’m using a C1MultiSelect is display list of objects of type:
/// <summary>
/// Class to hold all the ComboBox items and ID
/// </summary>
public class ComboEntity
{
public int ID { get; set; }
public string Title { get; set; }
}
When I bind a list of ComboEntity, I’m using:
List<ComboEntity> M_lstUserListEntries = new List<ComboEntity>();
// Fill M_lstUserListEntries with some entries
M_cmbUserList.ItemsSource = M_lstUserListEntries;
M_cmbUserList.DisplayMemberPath = "Title";
M_cmbUserList.SelectedValuePath = "Title";
// Here Dropdown List is correct
// Fill M_lstUserListEntries with different entries
M_cmbUserList.ItemsSource = M_lstUserListEntries;
M_cmbUserList.DisplayMemberPath = "Title";
M_cmbUserList.SelectedValuePath = "Title";
// Here Dropdown List is NOT correct
However when I change the contents of M_lstUserListEntries and update the C1MultiSelect control’s Item Source, I am finding the drop-down list contains the values from the PREVIOUS list. If I then select an entry from this dropdown, the text in the Combo is change to the corresponding string from the NEW list.
Is there something I need to do to update the Dropdown list if the ItemsSource changes?
Regards,
Mark Sloan