Allow user input (not only selection)

5 posts, 1 answers
  1. Jasna
    Jasna avatar
    9 posts
    Member since:
    Jun 2008

    Posted 20 Dec 2012 Link to this post

    Hello,
    Is there a way to allow user input into AutoCompleteBox (text that is not in the list)?
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 25 Dec 2012 Link to this post

    Hello Jasna,

    Yes, you could type text which is not in the list, but after that what do you need to happen with the text? Should it be added to the collection or deleted from the TextBox of the Autocomplete?
    If you could give us some more details what exactly you want to achieve, we will be able to assist you in the best manner.

    Kind regards,
    Konstantina
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Jasna
    Jasna avatar
    9 posts
    Member since:
    Jun 2008

    Posted 27 Dec 2012 Link to this post

    Hello Konstantina,

    What I was looking from AutoCompleteBox is for user to either pick from the preset list or type the text.

    For example:
    Allowing the user to choose the text color of the report: in the list there is brown and black color but user should be able to type blue.
    The entered (or picked) text color is saved and used when making that report.

    Regards,
    Jasna
  5. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 28 Dec 2012 Link to this post

    Hello Jasna,

    In order this to be achieved you need to hook to the KeyDown event of the AutoCompleteBox and add there the new item to its ItemsSource. Please find attached a sample application which illustrates this.

    Hope this helps.

    Regards,
    Konstantina
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Jasna
    Jasna avatar
    9 posts
    Member since:
    Jun 2008

    Posted 07 Jan 2013 Link to this post

    Hello Konstantina,

    Thank you for the time and effort you took to make the example application.
    It accomplishes what I wanted to do.

    Have a nice day,
    Jasna
Back to Top
UI for WPF is Visual Studio 2017 Ready