How do i set the value for ultraCombo dropdownlist when i know the value memeber.
ui_sourceDescription.Value = value; works but if the value is not in the list, then nothing shoudl be selected.
I am currently using this.
ui_exemptDescription.SelectedRow = GetSelectedRow(ui_exemptDescription,value);
private UltraGridRow GetSelectedRow(UltraCombo combo, string value) { UltraGridRow selectedRow = null; foreach (UltraGridRow row in combo.Rows) { if (row.Cells[combo.ValueMember].Value.ToString() == value) { selectedRow = row; break; } } return selectedRow; }
I hope there is a better way..
Setting the Value is a better way.
If you want to determine if the item exists on the list, then you can cast the control into an IValueList and use the GetText method.