Hi,
Why isn't there a check/uncheck all event for the combo box?
If I need to have a second related form element I can't do it from this as there is no JS event for when items are checked. Yes you can get individual checks but there is no event raised when all are done.
From looking at the forums this is appears to have been going on for a while. Please advise on a way to get notified on the client when the check all box is checked.
Thanks,
Jon
Why isn't there a check/uncheck all event for the combo box?
If I need to have a second related form element I can't do it from this as there is no JS event for when items are checked. Yes you can get individual checks but there is no event raised when all are done.
From looking at the forums this is appears to have been going on for a while. Please advise on a way to get notified on the client when the check all box is checked.
Thanks,
Jon
7 Answers, 1 is accepted
0

Princy
Top achievements
Rank 2
answered on 08 Nov 2012, 05:41 AM
Hi Jon,
Try the following code to achieve your scenario.
JS:
Hope this helps.
Thanks,
Princy.
Try the following code to achieve your scenario.
JS:
<script type=
"text/javascript"
>
function
OnClientItemChecked(sender, args)
{
var
check =
true
;
var
uncheck =
true
;
var
c =sender.get_items().get_count();
for
(
var
i = 0; i < sender.get_items().get_count(); i++)
{
if
(!sender.get_items()._array[i].get_checked())
{
check =
false
;
}
if
(sender.get_items()._array[i].get_checked())
{
uncheck =
false
;
}
}
if
(check)
{
alert(
"checked"
);
// Your Code
}
if
(uncheck)
{
alert(
"unchecked"
);
// Your Code
}
}
</script>
Hope this helps.
Thanks,
Princy.
0

Jon
Top achievements
Rank 1
answered on 08 Nov 2012, 10:01 AM
Hi Princy,
Thanks for that. It doesn't work though - that only gets fired when one of the normal checkboxes is ticked. If the Check All checkbox is ticked there appears to be no event for that! - and as per my other post none of them at all fire on the latest version for a parented drop down :(
It seems really strange to not have an event for the check all - or to fire a check event when the children are checked...
Regards
Jon
Thanks for that. It doesn't work though - that only gets fired when one of the normal checkboxes is ticked. If the Check All checkbox is ticked there appears to be no event for that! - and as per my other post none of them at all fire on the latest version for a parented drop down :(
It seems really strange to not have an event for the check all - or to fire a check event when the children are checked...
Regards
Jon
0
Accepted

Princy
Top achievements
Rank 2
answered on 09 Nov 2012, 03:56 AM
Hi Jon,
Try the following code to fire an event on changes in CheckAll checkbox of RadComboBox.
JS:
Hope this helps.
Thanks,
Princy.
Try the following code to fire an event on changes in CheckAll checkbox of RadComboBox.
JS:
<script type=
"text/javascript"
>
function
pageLoad()
{
var
combos = Telerik.Web.UI.RadComboBox.ComboBoxes;
if
(combos !=
null
)
{
for
(
var
i = 0; i < combos.length; i++)
{
var
combo = combos[i];
var
element = combo.get_dropDownElement();
var
checkAll = $telerik.$(element).find(
".rcbCheckAllItemsCheckBox"
);
checkAll.change(
function
() {
alert(combo._uniqueId);
});
}
}
}
</script>
Hope this helps.
Thanks,
Princy.
0

Jon
Top achievements
Rank 1
answered on 09 Nov 2012, 08:26 AM
Hi Princy,
You are as always a star!
Many thanks for your help.
Best Regards,
Jon
You are as always a star!
Many thanks for your help.
Best Regards,
Jon
0

Akun
Top achievements
Rank 1
answered on 29 Mar 2019, 12:55 PM
<script type="text/javascript">
function OnClientItemChecked(sender, args)
{
var check = true;
var uncheck = true;
var c =sender.get_items().get_count();
for (var i = 0; i < sender.get_items().get_count(); i++)
{
if (!sender.get_items()._array[i].get_checked())
{
check = false;
}
if (sender.get_items()._array[i].get_checked())
{
uncheck = false;
}
}
if (check)
{
alert("checked");
// Your Code
}
if (uncheck)
{
alert("unchecked");
// Your Code
}
}
</script>
function OnClientItemChecked(sender, args)
{
var check = true;
var uncheck = true;
var c =sender.get_items().get_count();
for (var i = 0; i < sender.get_items().get_count(); i++)
{
if (!sender.get_items()._array[i].get_checked())
{
check = false;
}
if (sender.get_items()._array[i].get_checked())
{
uncheck = false;
}
}
if (check)
{
alert("checked");
// Your Code
}
if (uncheck)
{
alert("unchecked");
// Your Code
}
}
</script>
0

Akun
Top achievements
Rank 1
answered on 29 Mar 2019, 12:56 PM
free fire unchek
<script type="text/javascript">
function OnClientItemChecked(sender, args)
{
var check = true;
var uncheck = true;
var c =sender.get_items().get_count();
for (var i = 0; i < sender.get_items().get_count(); i++)
{
if (!sender.get_items()._array[i].get_checked())
{
check = false;
}
if (sender.get_items()._array[i].get_checked())
{
uncheck = false;
}
}
if (check)
{
alert("checked");
// Your Code
}
if (uncheck)
{
alert("unchecked");
// Your Code
}
}
</script>
0

Akun
Top achievements
Rank 1
answered on 31 Mar 2019, 11:28 AM
<script type="text/javascript">
functionOnClientItemChecked(sender, args)
{
var check = true;
var uncheck = true;
var c =sender.get_items().get_count();
for (var i = 0; i < sender.get_items().get_count(); i++)
{
if(!sender.get_items()._array[i].get_checked())
{
check = false;
}
if(sender.get_items()._array[i].get_checked())
{
uncheck = false;
}
}
if (check)
{
alert("checked");
// Your Code
}
if (uncheck)
{
alert("unchecked");
// Your Code
}
}
</script> unchek Free Fire REGISTER Indonesia
functionOnClientItemChecked(sender, args)
{
var check = true;
var uncheck = true;
var c =sender.get_items().get_count();
for (var i = 0; i < sender.get_items().get_count(); i++)
{
if(!sender.get_items()._array[i].get_checked())
{
check = false;
}
if(sender.get_items()._array[i].get_checked())
{
uncheck = false;
}
}
if (check)
{
alert("checked");
// Your Code
}
if (uncheck)
{
alert("unchecked");
// Your Code
}
}
</script> unchek Free Fire REGISTER Indonesia