We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Single click anywhere to open and prevent null

When using a combo box I would like to open the list clicking anywhere inside the combo box and have the user select a value. I would like to prevent typing/inputting any value and force the end user to select only from the list.  Null would not be a valid value.


5 Replies

IL Indhumathy Loganathan Syncfusion Team April 6, 2023 10:13 AM UTC

Hi Brandon,


Greetings from Syncfusion support.


Before proceeding with your requirement, we would like to confirm whether you are using our EJ2 Combo Box component. Refer to the below documentation link and confirm the component.


https://ej2.syncfusion.com/aspnetcore/documentation/combo-box/getting-started


If possible, share the code snippets with us and get back to us if you need any further assistance.


Regards,

Indhumathy L



BD Brandon Devine April 6, 2023 10:55 AM UTC

I'm sorry I didn't include the ej2 piece.  It is ej2, but I do not have a code snippet because I am not sure how to accomplish my request.

There are two things I was hoping to accomplish. 

First I would like to be able to force the combo to open anytime you click anywhere in the combo box, not just when clicking the drop down arrow.


Second I would like to do something that would disable entry or typing of any kind, in an attempt to force the user to only select items in the datasource directly by clicking.

I hope that helps clear up the request.



UD UdhayaKumar Duraisamy Syncfusion Team April 10, 2023 06:14 AM UTC

You can try Syncfusion's DropdownList component instead of the ComboBox component for your needs. The DropdownList component has a visually appealing appearance and enables users to select a single, non-editable value from a list of predefined values. Please refer to the documentation and online demo shared below for more information about Syncfusion's DropdownList component.


Links:



BD Brandon Devine April 10, 2023 09:14 AM UTC

This was exactly what I was looking for.  Thank you very much!



UD UdhayaKumar Duraisamy Syncfusion Team April 10, 2023 11:32 AM UTC

We are glad that the suggestion helped you achieve your requirement. We are always happy to assist you.


Loader.
Live Chat Icon For mobile
Up arrow icon