Пример #1
0
        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;
            }
        }
Пример #2
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;
            }
        }