public static void csSetIndexByRid(this DevExpress.XtraEditors.ComboBoxEdit cb, int rid) { cb.SelectedIndex = -1; for (int i = 0; i < cb.Properties.Items.Count; i++) { TRID_NAME t = cb.Properties.Items[i] as TRID_NAME; if (t == null) { break; } if (t.RID == rid) { cb.SelectedIndex = i; break; } } }
public static int csGetRid(this ComboBoxEdit cb) { TRID_NAME temp = cb.csGetComboBox <TRID_NAME>(); return(temp == null ? 0 : temp.RID); }