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

Multi-Select ComboBox - use keyboard to check checkboxes

3 Answers 243 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thad
Top achievements
Rank 2
Thad asked on 11 Nov 2010, 07:29 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Simon
Telerik team
answered on 17 Nov 2010, 01:24 PM
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.
0
Thad
Top achievements
Rank 2
answered on 30 Dec 2010, 02:11 PM
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
0
Thad
Top achievements
Rank 2
answered on 14 Feb 2011, 09:43 PM
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
Tags
ComboBox
Asked by
Thad
Top achievements
Rank 2
Answers by
Simon
Telerik team
Thad
Top achievements
Rank 2
Share this question
or