DropDownList and AutoCompleteSource

3 posts, 0 answers
  1. Ivan
    Ivan avatar
    4 posts
    Member since:
    Dec 2017

    Posted 27 Jan 2018 Link to this post

    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. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3835 posts

    Posted 29 Jan 2018 Link to this post

    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.
  3. Ivan
    Ivan avatar
    4 posts
    Member since:
    Dec 2017

    Posted 30 Jan 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks alot, it's work perfectly!
Back to Top