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

Case Insensitive AutoComplete with AllowCustomText

10 Answers 102 Views
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 08 Jun 2011, 05:50 PM

I'm having a problem with combobox doing an AutoComplete (ie markfirstmatch="true") when the cases don't match, and there are similar selection values.  For example:

<telerik:RadComboBox ID="RadComboBox1" runat="server" AllowCustomText="True"
    MarkFirstMatch="True">
    <Items>
        <telerik:RadComboBoxItem runat="server" />
        <telerik:RadComboBoxItem Text="PAY" Value="PAY" />
        <telerik:RadComboBoxItem Text="PAYB" Value="PAYB" />
    </Items>
</telerik:RadComboBox>
<asp:Button ID="Postback" runat="server" Text="Post" OnClick="Postback_Click" />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>

 

 

 

protected void Postback_Click(object sender, EventArgs e)

 

 

{

 

Label1.Text = RadComboBox1.Text;

 

}

 

 

When tabbing into the field (not clicking) so that the drop down does not open up, you try to type "PAYB", but in lower case.  As you type, the box starts to find "PAY", but then when you type the last "b", the result is "PAYb".  It does not find PAYB as expected.

What's even more concerning is that tabbing out and posting back, the combobox's text property is set to "PAY". (See screenshot attachments).


I've tried some possible solutions.  I've tried using the Filter property.  That works well when the drop down is opened, but when it is closed (ie tabbed into the field), you lose the AutoComplete functionality.

Is this solvable without using some javascript?  If not, would doing some javascript to change lowercase to uppercase as the user types work?  I'm not very well versed with javascript, so I don't know how that would look.

Thanks for the help!

10 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 13 Jun 2011, 03:40 PM
Here's some more information that I've discovered.

I tried using some javascript to solve the problem.  My first idea was to change the text from lower to upper case as the user types.  I did this by using the OnClientKeyPressing event and checking the window.event.keyCode value.  This doesn't work because the keyCode only ever sees the uppercase value (not sure if this is a javascript thing or ComboBox thing).

The next thing I tried was to change the value to upper case on OnClientTextChange.  This fails because the javascript only sees the "PAY" value and not the entire "payb" as typed (from previous example).

I'm out of ideas at this point.  I've submitted this as a bug in the Issue Tracker.

 

0
Dimitar Terziev
Telerik team
answered on 14 Jun 2011, 12:25 PM
Hi Kevin,

As I've mentioned in the support ticket you have submitted, this behavior is due to a bug, which is reproduced in IE7 and IE8.

If we came up with a workaround for it, you will be notified.

Kind regards,
Dimitar Terziev
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
David
Top achievements
Rank 1
answered on 07 Jul 2011, 03:49 PM
I was able to reproduce in Firefox, Chrome and IE
0
Dimitar Terziev
Telerik team
answered on 08 Jul 2011, 05:32 PM
Hello David,

Could you specify which version of the controls you are using?

Greetings,
Dimitar Terziev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
James
Top achievements
Rank 1
answered on 15 Nov 2011, 08:25 PM
I'm experiencing the same behavior in IE8.  I'm using the RadControls for ASP.NET AJAX Q1 2011 NET35.  Has this been resolved yet?
0
David
Top achievements
Rank 1
answered on 15 Nov 2011, 09:30 PM
James,

If I recall correctly, when researching this issue, after browsing and searching for hours, I did not find a solution to this and ended up implementing my own (removing and adding items to the combobox manually OnKeyUp).

In retrospect, I wish I had just gone with the jquery autocomplete. You can find it here:

http://jqueryui.com/demos/autocomplete/

0
James
Top achievements
Rank 1
answered on 16 Nov 2011, 02:19 PM
Hi David,

Thanks for the quick reply!   I've got a lot of RadComboBoxes and code behind plumbing to pull out and replace with a jQuery solution but it's looking like I might not have a choice.  Thanks for the link!

James  
0
Dimitar Terziev
Telerik team
answered on 18 Nov 2011, 02:13 PM
Hi James,

Please try to upgrade to the latest version of the controls if possible, and let me know whether the problem persists.

Greetings,
Dimitar Terziev
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Matt
Top achievements
Rank 1
answered on 27 Mar 2012, 08:44 PM
I have the latest mvc controls and the bug still exists in IE 8.  Is there any solution? 

Thanks
0
Dimitar Terziev
Telerik team
answered on 30 Mar 2012, 10:44 AM
Hi Matt,

In case you experience problems with the ComboBox from our MVC suite, than it's better to post your query in their forum since this one is for RadControls for ASP.NET Ajax.

All the best,
Dimitar Terziev
the Telerik team
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Kevin
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
Dimitar Terziev
Telerik team
David
Top achievements
Rank 1
James
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Share this question
or