Case Insensitive AutoComplete with AllowCustomText

11 posts, 0 answers
  1. Kevin
    Kevin avatar
    5 posts
    Member since:
    Nov 2008

    Posted 08 Jun 2011 Link to this post

    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!

  2. Kevin
    Kevin avatar
    5 posts
    Member since:
    Nov 2008

    Posted 13 Jun 2011 Link to this post

    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.

     

  3. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 14 Jun 2011 Link to this post

    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.

  4. David
    David avatar
    10 posts
    Member since:
    Dec 2010

    Posted 07 Jul 2011 Link to this post

    I was able to reproduce in Firefox, Chrome and IE
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 08 Jul 2011 Link to this post

    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!

  6. James
    James avatar
    8 posts
    Member since:
    Sep 2007

    Posted 15 Nov 2011 Link to this post

    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?
  7. David
    David avatar
    10 posts
    Member since:
    Dec 2010

    Posted 15 Nov 2011 Link to this post

    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/

  8. James
    James avatar
    8 posts
    Member since:
    Sep 2007

    Posted 16 Nov 2011 Link to this post

    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  
  9. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 18 Nov 2011 Link to this post

    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
  10. Matt
    Matt avatar
    8 posts
    Member since:
    Feb 2011

    Posted 27 Mar 2012 Link to this post

    I have the latest mvc controls and the bug still exists in IE 8.  Is there any solution? 

    Thanks
  11. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 30 Mar 2012 Link to this post

    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.
Back to Top