Ignore accent in autocomplete ComboBox

4 posts, 0 answers
  1. Guillaume
    Guillaume avatar
    15 posts
    Member since:
    Oct 2010

    Posted 21 Feb 2014 Link to this post


    I am trying to find a way to ignore the accents entered in the combobox with the autocomplete function.

    If someone enter "René" as text, the function I used to populate the combobox won't use the accent and the actual filter used will be "Rene".
    But as a result that none of my result contains an accent, nothing is displayed in the comboxbox, except the number of results  found.

    Is there any way for the combobox to not use the accent in the filter ?

    Thanks !
  2. Nencho
    Nencho avatar
    1446 posts

    Posted 26 Feb 2014 Link to this post

    Hello Guillaume,

    The RadComboBox does not support such functionality by design. However, I would suggest you to implement a LoadOnDemand functionality and the desired functionality, by handling the event handler (ItemsRequested) and getting the typed characters and then returning the desired results.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
  4. Arcelia
    Arcelia avatar
    1 posts
    Member since:
    Jul 2015

    Posted 14 Jul 2015 in reply to Nencho Link to this post

    Hello Nencho,


    Can you make a example please.?



  5. Nencho
    Nencho avatar
    1446 posts

    Posted 17 Jul 2015 Link to this post

    Hello Arcella,

    You can simply replace the é character with e in the filter string, which is accessible in the ItemsRequested event handler. Please consider the below implementation:

    protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
           var searchString = e.Text;
           searchString = searchString.Replace("é", "e");
           List<RadComboBoxItem> list = new List<RadComboBoxItem>();
           for (int i = 0; i < 20; i++)
               list.Add(new RadComboBoxItem("Cent" + i.ToString()));
           var filteredFileSet = list.Where(item => item.Text.Contains(searchString));
           RadComboBox1.DataSource = filteredFileSet;
           RadComboBox1.DataTextField = "Text";

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top