All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
I wonder would it be possible when a listveiw is rendered as a list of checkboxes, add an option to display Select/Deselect All checkbox at the top of the list? It could separated by a horizontal line. E.g.
Select/Deselect All --------------------- Checkbox 1 Checkbox 2 Checkbox 3 Checkbox 4 ...
<style type=
"text/css"
>
.categories
{
background-color
: Gray;
}
</style>
<
telerik:RadListBox
ID
=
"RadListBox1"
runat
"server"
CheckBoxes
"true"
OnClientItemChecked
"OnClientItemChecked"
Items
telerik:RadListBoxItem
Text
"All"
/>
CssClass
"categories"
Checkable
"false"
"RadListBoxItem1"
"RadListBoxItem2"
"RadListBoxItem3"
"RadListBoxItem4"
"RadListBoxItem5"
"RadListBoxItem6"
"RadListBoxItem7"
"RadListBoxItem8"
"RadListBoxItem9"
"RadListBoxItem10"
"RadListBoxItem11"
</
<script type=
"text/javascript"
function
OnClientItemChecked(sender, e) {
var
item = e.get_item();
items = sender.get_items();
checked = item.get_checked();
firstItem = sender.getItem(0);
if
(item.get_text() ==
) {
items.forEach(
(itm) { itm.set_checked(checked); });
else
(sender.get_checkedItems().length == items.get_count() - 1) {
firstItem.set_checked(!firstItem.get_checked());
</script>