Select item based on first letter

8 posts, 0 answers
  1. Marty
    Marty avatar
    61 posts
    Member since:
    Oct 2008

    Posted 20 Jan 2009 Link to this post

    I have the following combo box in many places in my code:

    <telerik:RadComboBox ID="cboSystem" runat="server" > 
      <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
    </telerik:RadComboBox> 

    When you tab into the box and want to type the first letter of item you want to select... it snaps to that item without issue if they start with an uppercase character.  If they start with a lower case character, then it does not snap to the item.

    Example:
    A RadCombobox contains 3 items:
    • dog
    • cat
    • Lizard

    When you tab into this box and type 'l' (cap locks doesn't matter), it selects Lizard, as I would expect it to.  However, if you tab into the same box, and type 'd' or 'c', it does not snap to the items as you would expect and as it did with the 'l'.

    I do not want to allow editable text in the combo box, but is there a property that will tell it to ignore case when snapping to an item in a combobox like that above?

    Any input is appreciated. 

    Thanks,
    Marty

  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 20 Jan 2009 Link to this post

    Heya Marty,

    Hmm, if you use AllowCustomtext=False and MarkFirstMatch=True you should get the desired result.  I just tested the following:

    <telerik:RadComboBox ID="cboSystem" runat="server" AllowCustomText="false"   
                         MarkFirstMatch="true" >    
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>    
            <Items> 
                <telerik:RadComboBoxItem Text="dog" /> 
                <telerik:RadComboBoxItem Text="cat" /> 
                <telerik:RadComboBoxItem Text="Crayon" /> 
                <telerik:RadComboBoxItem Text="Lizard" /> 
            </Items> 
    </telerik:RadComboBox>  

    ... and regardless of what case (using caps lock or shift) I typed, I would get cat for c/C, Lizard for l/L, and dog for d/D.  Try adding those properties to your combobox to see if it is achieving the desired result.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marty
    Marty avatar
    61 posts
    Member since:
    Oct 2008

    Posted 20 Jan 2009 Link to this post

    Hey Serrin,

    Thank you for the quick reply.

    Yes the suggested changes DO work... however, you lose the ability to continue pressing the same key to move to the next item in the combobox that starts with that letter.  That is because of the MarkFirstMatch=true attribute.

    Setting it to true - you successfully go to the first item that start with the letter pressed, regardless of case, but no further if you press the same key again.
    Setting it to false - you get the same behavior I started with.

    Is there any other way around this that would still allow multiple key presses to go on to the next item starting w/the same letter?

    Thanks again,
    Marty
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 23 Jan 2009 Link to this post

    Hi Marty,

    This issue will be fixed in the next official release. Thank you for reporting it.

    All the best,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Marty
    Marty avatar
    61 posts
    Member since:
    Oct 2008

    Posted 30 Mar 2009 Link to this post

    Hi,

    I'm assuming that Q1 2009 counts as the next official release, I'm just curious if this was addressed.  In my app, using the latest version of the controls Q1 '09, this behavior still occurs as described in my original post.  Is there some attribute I need to set in order to acheive my desired result or was it not implmented?  Thanks.

    Marty
  7. Marty
    Marty avatar
    61 posts
    Member since:
    Oct 2008

    Posted 31 Mar 2009 Link to this post

    Anybody?
  8. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 01 Apr 2009 Link to this post

    Hello Marty,

    This issue is not fixed yet, but is logged in our bug-tracking system and we'll do our best to address it for the SP1 which will be available by the end of the week.
     
    In case we don't manage to fix it for the service pack, you could download an internal build as soon as it's addressed. Thank you for your understanding. 

    All the best,
    Yana
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  9. Marty
    Marty avatar
    61 posts
    Member since:
    Oct 2008

    Posted 01 Apr 2009 Link to this post

    Thank you.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017