Posted 26 September 2022, 1:22 pm EST
How to restrict c1combobox to allow only combo list data?
Forums Home / ComponentOne / WinForms Edition
Posted by: luis_carlosh on 26 September 2022, 1:22 pm EST
Posted 26 September 2022, 1:22 pm EST
How to restrict c1combobox to allow only combo list data?
Posted 27 September 2022, 12:23 am EST
Hi Luis,
To restrict users to only select the data specified in the combo i[/i] list you can assign the DropDownStyle property of C1ComboBox equal to DropDownStyle.DropDownList.
This way the text portion of the C1ComboBox will not be editable and the user cannot enter a value not existing in the drop down.
Refer to the code snippet below
c1ComboBox1.DropDownStyle = C1.Win.C1Input.DropDownStyle.DropDownList;
Please find attached a sample implementing the same.
Regards,
Anand