6 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 11 Nov 2009, 07:25 AM
Hi Medac,
A new server-side event " ItemChecked " is added in the latest version of RadListBox (RadControls for ASP.NET AJAX 2009.3 1103), which fired when an item checked state is changed. Download the latest version of RadListBox if you don't have and attach the event to accomplisgh the functionality that you need.
Regards,
Shinu.
A new server-side event " ItemChecked " is added in the latest version of RadListBox (RadControls for ASP.NET AJAX 2009.3 1103), which fired when an item checked state is changed. Download the latest version of RadListBox if you don't have and attach the event to accomplisgh the functionality that you need.
Regards,
Shinu.
0
Sourabh
Top achievements
Rank 1
answered on 08 May 2012, 08:31 AM
hi
i have a one checkbox for eg. 'checkbox1' out of the listbox and i want to check all the checkboxes in the listbox when i check 'checkbox1 '
how can i do that
thankyou.
i have a one checkbox for eg. 'checkbox1' out of the listbox and i want to check all the checkboxes in the listbox when i check 'checkbox1 '
how can i do that
thankyou.
0
Sourabh
Top achievements
Rank 1
answered on 08 May 2012, 08:32 AM
hi
i have a one checkbox for eg. 'checkbox1' out of the listbox and i want to check all the checkboxes in the listbox when i check 'checkbox1 '
how can i do that??
thankyou.
i have a one checkbox for eg. 'checkbox1' out of the listbox and i want to check all the checkboxes in the listbox when i check 'checkbox1 '
how can i do that??
thankyou.
0
Princy
Top achievements
Rank 2
answered on 08 May 2012, 09:04 AM
Hi Sourabh,
Try the following code snippet.
C#:
Hope this helps.
Thanks,
Princy.
Try the following code snippet.
C#:
protected
void
CheckBox1_CheckedChanged(
object
sender, EventArgs e)
{
foreach
(RadListBoxItem item
in
R.Items)
{
item.Checked =
true
;
}
}
Hope this helps.
Thanks,
Princy.
0
Sourabh
Top achievements
Rank 1
answered on 08 May 2012, 09:09 AM
thanks Princy for reply but there is a problem if i use this method i will have to keep autopostback=true which i dont want to. Is there any javascript for this???
thankyou
Sourabh.
thankyou
Sourabh.
0
Princy
Top achievements
Rank 2
answered on 08 May 2012, 10:28 AM
Hi Sourabh,
Try the following JavaScript in OnClick event of CheckBox.
ASPX:
JS:
Thanks,
Princy.
Try the following JavaScript in OnClick event of CheckBox.
ASPX:
<
asp:CheckBox
ID
=
"CheckBox1"
runat
=
"server"
OnClick
=
"OnClick();"
/>
JS:
<script type=
"text/javascript"
>
function
OnClick()
{
var
chk = document.getElementById(
"CheckBox1"
);
var
list = $find(
"<%= RadListBox1.ClientID %>"
);
if
(chk.checked ==
true
)
{
for
(
var
i = 0; i < list.get_items().get_count(); i++)
{
list.get_items().toArray()[i].check();
}
}
}
</script>
Thanks,
Princy.