This is a migrated thread and some comments may be shown as answers.

RadComboBox Not Allowing Spaces In Custom Text

4 Answers 267 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 28 Apr 2010, 03:15 PM
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

4 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 28 Apr 2010, 05:00 PM
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.
0
Mark
Top achievements
Rank 1
answered on 28 May 2010, 03:41 PM
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.
0
Veronica
Telerik team
answered on 03 Jun 2010, 07:22 AM
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.
0
Steven Hong
Top achievements
Rank 1
answered on 11 Jun 2010, 06:00 AM
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.

Tags
ComboBox
Asked by
Nathan
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Mark
Top achievements
Rank 1
Steven Hong
Top achievements
Rank 1
Share this question
or