DropDownList with optional input

1 Answer 706 Views
DropDownList
Jerdobi
Top achievements
Rank 1
Iron
Iron
Jerdobi asked on 18 Mar 2022, 10:26 PM
I want to provide a dropdownlist with some known values.  There is a chance that the user will want to input another value other than in the dropdown.  Is there an example of having a dropdown list with either a optional value that can be specified in a textbox or such?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 19 Mar 2022, 01:03 PM

Hi Jerdobi,

The combobox can let the user input custom values, but they must then be strings as it is a mere text input in this case: https://docs.telerik.com/blazor-ui/components/combobox/custom-value. For other intents and purposes, the combo box works mostly like the dropdownlist and has the same set of events, behaviors and functionality.

If you want the users to edit the data, you may want to consider a grid, or a dedicated button in the header/footer template of the dropdown to open a dialog to let them add the desired new value.

The following enhancement would also let you put a grid in a dropdown: https://feedback.telerik.com/blazor/1506370-dropdown-container-popup-component-tied-to-an-anchor-for-positioning. It also links ideas for dedicated dropdown grids and other similar components. If you find any of these interesting, you can use the supplied sample snippets for the time being, and also Vote for and Follow the enhancements you find useful.

Regards,
Marin Bratanov
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/.

Tags
DropDownList
Asked by
Jerdobi
Top achievements
Rank 1
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or