Multiple delimiter for RadAutoCompleteBox

7 posts, 0 answers
  1. Vannick
    Vannick avatar
    9 posts
    Member since:
    Nov 2017

    Posted 28 Dec 2017 Link to this post

    Hi,

    The delimiter is a char attribute in RadAutoCompleteBox.

    Is it possible to have multiple delimiter (like space and enter) ?

    If yes how?

    Thanks a lot

  2. Dess
    Admin
    Dess avatar
    2576 posts

    Posted 29 Dec 2017 Link to this post

    Hello, Vannick, 

    Thank you for writing.  

    Currently, RadAutoCompleteBox supports only one delimiter. However, we already have a similar feature request logged in our feedback portal. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

    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. Vannick
    Vannick avatar
    9 posts
    Member since:
    Nov 2017

    Posted 03 Jan Link to this post

    Ok, thanks for the information.

    An other question, is it possible to set the delimiter to the key 'Enter'. I have tried something like that but it does not seems to work:

    this.radAutoCompleteBoxTags.Delimiter = '\r';

    Thanks for the info

     

     

  4. Dess
    Admin
    Dess avatar
    2576 posts

    Posted 03 Jan Link to this post

    Hello, Vannick, 

    Thank you for writing back. 

    When you start typing in RadAutocompleteBox, a popup with suggestions will be shown. If you press the Enter key, the selected item will be added as a token. The Text property will be updated accordingly containing all tokens separated by the delimiter. Here is a sample code snippet how to assign the Enter key as a delimiter: 
    this.radAutoCompleteBox1.AutoCompleteDataSource = this.customersBindingSource;
    this.radAutoCompleteBox1.AutoCompleteDisplayMember = "ContactName";
    this.radAutoCompleteBox1.Delimiter = (char)Keys.Enter;

    I hope this information helps. If you have any additional questions, please let me know. 

     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.
  5. Vannick
    Vannick avatar
    9 posts
    Member since:
    Nov 2017

    Posted 03 Jan Link to this post

    Yes I know what you means, however I am afraid this is not exactly what I want.

    Let's imagine, we have an autocomplete than can contains multiple items, what i would like it that each time i press Enter, a new token is created (even if my token is not present in the auto complete data source).

    I put an attachment what his the behaviour on my side. You can see that instead to create a new token, the text entered is selected.

    How to create a new token by just pressing Enter (like if I press ';')

    Thanks a lot, I hope I am clear

     

  6. Dess
    Admin
    Dess avatar
    2576 posts

    Posted 04 Jan Link to this post

    Hello, Vannick, 

    Thank you for writing back. 

    The provided clarification is greatly appreciated. It helped me better understand your requirement. You can leave the default delimiter in this case. Just handle the TextBoxElement.KeyPress event and make the custom text a token. Here is a sample code snippet which result is illustrated in the attached gif file: 
    this.radAutoCompleteBox1.TextBoxElement.KeyPress += TextBoxElement_KeyPress;

    private void TextBoxElement_KeyPress(object sender, KeyPressEventArgs e)
    {
        if (e.KeyChar == (char)Keys.Enter)
        {
            this.radAutoCompleteBox1.Text = this.radAutoCompleteBox1.Text + ";";
            this.radAutoCompleteBox1.TextBoxElement.SelectionStart = this.radAutoCompleteBox1.Text.Length;
        }
    }

    I hope this information helps. If you have any additional questions, please let me know. 

     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.
  7. Vannick
    Vannick avatar
    9 posts
    Member since:
    Nov 2017

    Posted 06 Jan Link to this post

    It works like a charm.

    Thanks !

Back to Top