This is a migrated thread and some comments may be shown as answers.

DropDownList and AutoCompleteSource

2 Answers 36 Views
This is a migrated thread and some comments may be shown as answers.
Ivan
Top achievements
Rank 1
Ivan asked on 27 Jan 2018, 11:55 AM

Hello guys! I have a small deal with DropDownList...



I need to create a path selector, and this is how I see it:
- when I'm writing "C:\" DropDown starts showing AutoComplete options
- Paths that were in usage  (it will be decided after some program runs) it will save it to its DataSource.

Standard Combox can do all of theese requirements, It will be like:
AutoCompleteSource = AutoCompleteSource.FileSystemDirectories
and after save the "good" paths to DataSource.

I find somthing same in the Telerik lib - a DropDownList but it hasn't property AutoCompleteSource where I can set AutoCompleteSource.FileSystemDirectories...

I continued to search for solutions and found RadMaskedEditBox that has AutoCompleteSource like I want, but has no DropDownMenu for saving used pathes.
If there other solutions that I didn't see? I don't want to write algorithm for DropDownList which will AutoComplete directories, I think there is a more beautiful solution.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Jan 2018, 01:20 PM
Hello, Ivan,

Thank you for writing.  

RadDropDownList provides flexible auto-completion options that suggest and append text from choices in the list as the user types. The suggestions comes from the applied DataSource collection Additional information about the supported functionality is available in the following help article: https://docs.telerik.com/devtools/winforms/dropdown-listcontrol-and-checkeddropdownlist/dropdownlist/features/auto-complete

Note that RadDropDownList hosts the standard MS TextBox. Hence, you can use its autocomplete behavior in order to get a similar functionality. Here is a sample code snippet demonstrating how to enable it:
this.radDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.AutoCompleteSource = AutoCompleteSource.FileSystemDirectories;
this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.AutoCompleteMode = AutoCompleteMode.Suggest;



I hope this information helps. Should you have further questions I would be glad to help. 
 
 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Ivan
Top achievements
Rank 1
answered on 30 Jan 2018, 08:05 PM
Thanks alot, it's work perfectly!
Asked by
Ivan
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Ivan
Top achievements
Rank 1
Share this question
or