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

Radcombobox with checkboxes

2 Answers 1156 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 09 Jan 2012, 08:00 PM
I'm trying to implement a radcombobox with checkboxes for multiselection. I'm using an ItemTemplate with an asp:CheckBox.

The data is populated fine but the functionality I'm trying to acheive is:

-The user should be able to select multiple values while the drop down is open, and then as soon as the drop down closes a postback to the server should happen where I have an event handler to handle the newly selected/deselected check boxes. Right now I set autopost back to true on the check box and it posts back every time there is an individual a check change. How do I fix this so it happens only when the drop down closes? (And not a client side side event, I want server side).

-Also the user should not be able to select an item in the combobox. The user should be able to check the check boxes on and off but not select a value. How do I fix this? Or if the user does select a value then the check mark should toggle on and off, not set the text of the combo box to the single selected value. (The text value should be ALL checked boxes, not just 1)


 

2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 2
answered on 10 Jan 2012, 02:48 PM
Hello Ryan,

If you're using the latest version of the RadControls, then you should use the built-in checkbox feature.

Checkbox feature demo: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx

Otherwise, if you're using a version that doesn't have this feature you implement code similar to this online demo. You'll need to refer to the code used by the Type drop-down.

Checkbox template demo: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

I hope that helps.
0
Nahwin
Top achievements
Rank 1
answered on 13 Aug 2013, 09:17 AM
Hi Kevin,

that is nice example but the main issue is that the "itemChecked" event kept fired each time individual item got checked/unchecked we need some event that can be triggered after user finished selecting item (something like radcombobox lost focus, drop down closed, etc)

@Ryan,
you can just ignore the selected value option and only hangled the "RadComboBox.CheckedItems"
Tags
ComboBox
Asked by
Ryan
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 2
Nahwin
Top achievements
Rank 1
Share this question
or