RadComboBox Not Allowing Spaces In Custom Text

5 posts, 0 answers
  1. Nathan
    Nathan avatar
    7 posts
    Member since:
    Apr 2010

    Posted 28 Apr 2010 Link to this post

    I have the following RadComboBox bound to a list of US States

      <telerik:RadComboBox 
           ID="ddlPropertyState" 
           Runat="server" 
           Skin="Windows7"  
           Width="140px"
           AutoPostBack="true" 
           AllowCustomText="true"
           EmptyMessage="Choose..." 
           MarkFirstMatch="true" 
           EnableTextSelection ="true" 
           onselectedindexchanged="ddlPropertyState_SelectedIndexChanged1"
         >
         </telerik:RadComboBox>

    The state names represent the full state names (i.e. New York).  When I type New, I get New Hampshire selected (due to alphabetical order), however hitting the space bar has no effect (i.e. I can't type New<space>York).  Is there a problem in my configuration that prevents me from doing that?

    Thanks,
    Nathan
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 28 Apr 2010 Link to this post

    Hi Nathan,

    Please take a look at this demo. Try to write "Carlos". There are two people with that name. If you want to select "Carlos Hernández" instead of "Carlos González" - the space will not be marked, but as soon as you type "Carlos H" you'll get the right guy selected.

    Please let me know if I get your question right or if you still need some help.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. Mark Meikle
    Mark Meikle avatar
    16 posts
    Member since:
    Mar 2010

    Posted 28 May 2010 Link to this post

    I am experiencing this same problem.  In my DB, I have "The Spinners". 

    When trying to add a new custom entry, with "Allow custom text" and "markfirstmatch" both enabled if I type "The " I can't create a new custom text of "The Soldiers" for example.  It will not allow it, but instead forces "The Spinners"

    I also have "ShowDropDownOnTextBoxClick" set to False.

    I tried setting the filter to "Contains" and "StartsWith" but that disrupts the autocomplete functionality when the ShowDropDownOnTextBoxClick is set to false.
  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 03 Jun 2010 Link to this post

    Hi Mark Meikle,

    Thanks you for posting this. We've logged it as a bug and it will be fixed soon.

    You can follow the PITS Issue ID: 2307

    All the best,
    Veronica Milcheva
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  5. Steven Hong
    Steven Hong avatar
    1 posts
    Member since:
    Apr 2007

    Posted 11 Jun 2010 Link to this post

    While Telerik guys are fixing the bug, you can try using the following script to remedy the problem:

            function onKeyPressing(sender, eventArgs) {
                var e = eventArgs.get_domEvent();
                var keyCode = e.keyCode || e.which;
                var shouldMarkFirstMatch = (keyCode !== 32);

                sender.set_markFirstMatch(shouldMarkFirstMatch);
            }

    The script will disable matching when you press the space key and enable it back when you press any other key.  In my quick testing, it seems to work fine.

Back to Top