hi,
I have created a radcombobox that supports checking multiple items via checkboxes. there are several examples here on the forum and i kinda used a combination of ideas for my version. since the radcombobox only supports selection of one item at a time, i decided that i would make use of the EmptyText property to display information about what is currently checked (i.e. All Items, Single item, x items selected) and this works great, but the one issue i have is that if a user clicks to the right of the text for a checkbox in the dropdown list, the action is that the radcombobox will then make that item its currently selected item instead of just checking the checkbox. I am thinking this is because the checkbox is not as wide as the listbox parent. take a look at the attached image to see the area in red box that you can click on which will just change the radcombobox selected item instead of checking the item.
every example of a multiple select radcombobox (using checkboxes) that is on this forum seems to have this same issue, so I dont know if this is really a radcomboxbox issue or a checkbox issue, but maybe someone can shed some light?
- any ideas on how to make the checkbox as wide as the list it is contained in so that clicking anywhere to the right of the text would still check the item?
- or is this a scenerio where i need to actually change the control template for the radcombobox?
a working example would be appreciated.
I have created a radcombobox that supports checking multiple items via checkboxes. there are several examples here on the forum and i kinda used a combination of ideas for my version. since the radcombobox only supports selection of one item at a time, i decided that i would make use of the EmptyText property to display information about what is currently checked (i.e. All Items, Single item, x items selected) and this works great, but the one issue i have is that if a user clicks to the right of the text for a checkbox in the dropdown list, the action is that the radcombobox will then make that item its currently selected item instead of just checking the checkbox. I am thinking this is because the checkbox is not as wide as the listbox parent. take a look at the attached image to see the area in red box that you can click on which will just change the radcombobox selected item instead of checking the item.
every example of a multiple select radcombobox (using checkboxes) that is on this forum seems to have this same issue, so I dont know if this is really a radcomboxbox issue or a checkbox issue, but maybe someone can shed some light?
- any ideas on how to make the checkbox as wide as the list it is contained in so that clicking anywhere to the right of the text would still check the item?
- or is this a scenerio where i need to actually change the control template for the radcombobox?
a working example would be appreciated.
<
telerik:RadComboBox
ItemsSource
=
"{Binding Employees}"
EmptyText
=
"{Binding SelectedEmployeeText}"
telerik:TextSearch.TextPath
=
"DisplayName"
HorizontalAlignment
=
"Left"
Margin
=
"78,100,0,0"
x:Name
=
"radComboBox1"
VerticalAlignment
=
"Top"
Width
=
"250"
>
<
telerik:RadComboBox.ItemTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"{Binding IsChecked, Mode=TwoWay}"
Content
=
"{Binding DisplayName}"
/>
</
DataTemplate
>
</
telerik:RadComboBox.ItemTemplate
>
</
telerik:RadComboBox
>