Please add a way to add, if it is missing in the item list, and set the selected item of a combobox programmatically. This will spare the need to call the remote source and have duplicate data.
Example: if you choose a city from a combobox and the city has all the information about the province, the province combobox should populate with the correct data without needing to call the remote source.
An Implementation of this could be:
public void SetSelectedItem(TItem item)
{
if (item == null)
{
ClearButtonClick();
}
else
{
ListDataItem clonedItem = CreateDataItem(item.Clone());
var dataItemToSelect = DataItems.FirstOrDefault(x => x.Value.Equals(clonedItem.Value));
if (dataItemToSelect == null)
{
dataItemToSelect = clonedItem;
AddCustomValue(dataItemToSelect.Text, dataItemToSelect.Value, dataItemToSelect.DataItem);
}
SelectItem(dataItemToSelect);
}
}