Multi-Select ComboBox - use keyboard to check checkboxes

4 posts, 1 answers
  1. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 11 Nov 2010 Link to this post

    2010 Q2 controls, VS 2010, C# 4.0

    We are using the sample you provide to support multi-select via checkboxes and delimited lists.

    Here are some items in a dummy ComboBox.
    Cat
    Dog
    Gorilla
    Mouse

    I need to enhance this so that the user doesn't have to use the mouse to select anything. I want the users to be able to select items in the following two ways.

    Method 1: Auto-complete should allow the user to type d,m and have it check the appropriate checkboxes for Dog and Mouse.
    Method 2: Space Bar selection.  Pressing the down arrow to get to Dog and pressing the space bar or comma should check the box and add it to the list.

    Before I go recreate the wheel, does anyone have a link to something similar to what I'm wanting to do?  I've searched a lot but didn't find anything.

    Thanks!
    Thad
  2. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 17 Nov 2010 Link to this post

    Hi Thad,

    The best way to get the keyboard support and in general multiple selection in RadComboBox is to use one Item with RadListBox in its ItemTemplate. RadListBox has keyboard support turned on by setting its TabIndex property (most conveniently to '-1') . You can then handle the client-side ItemChecked event of the ListBox to preserve the functionality you already have.

    The other way around would involve more coding however. First you can handle the KeyPressing event of the ComboBox. Then you will need to divide the text in the input by the separator and then for each text find the respective Item in the ListBox and check it.

    I hope this gets you on the right track.

    Best wishes,
    Simon
    the Telerik team
    Browse the vast support resources we have to jumpstart 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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 30 Dec 2010 Link to this post

    Thanks for the input, Simon!  I'll give these options a try and will post back with a solution when I am able.

    Happy New Year!
    Thad
  5. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 14 Feb 2011 Link to this post

    Simon,

    Just wanted to follow-up and let you know we went with the RadListBox inside of the ItemTemplate.  Works like a champ for the most part, but we are having a few weird issues.  I've opened support tickets for those issues as necessary because a working project is necessary to demonstrate the issue.

    Thanks for your assistance,
    Thad
Back to Top