private static void EventTextChanged(object sender, EventArgs e) { if (sender is RadDropDownList == false) { return; } RadDropDownList DList = sender as RadDropDownList; if (DList.FindStringExact(DList.Text) < 0) { DList.SelectedIndex = 0; } }
public static void Select(this RadDropDownList cmb, string text) { try { int idx = cmb.FindStringExact(text); if (idx < 0) { return; } cmb.SelectedIndex = idx; } catch (Exception ex) { _logger.LogError(ex, "An error occurred", "", ""); throw; } }