radCheckedDropDownList - How do I make it so the user can't type in the edit box?

1 Answer 137 Views
CheckedDropDownList
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
Troy asked on 09 Jan 2022, 05:27 AM

I have a list of items for a checkeddropdownlist, I don't want the user to be able to type in the dropdown.  I'd like for them to ONLY be able to uncheck/check items I've predefined.  

Essentially, I want what you do with the dropDownStyle property set to DropDownList for normal dropdownlist controls.

1 Answer, 1 is accepted

Sort by
1
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 10 Jan 2022, 09:19 AM
Hello, Troy,

Please refer to the below code snippet demonstrating how to handle the keyboard input in the editable part of RadCheckedDropDownList and disable typing:
        public RadForm1()
        {
            InitializeComponent();

            this.radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.KeyPress += AutoCompleteTextBox_KeyPress;

        }

        private void AutoCompleteTextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            e.Handled = true;
        }

Thus, the users can use the drop down and check the desired items. I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Troy
Top achievements
Rank 3
Bronze
Iron
Iron
commented on 10 Jan 2022, 10:06 PM

This makes sense, I just thought there'd be a property that would do it instead.  Thank you.
Tags
CheckedDropDownList
Asked by
Troy
Top achievements
Rank 3
Bronze
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or