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

Change Checkbox Status on click

1 Answer 65 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
russ
Top achievements
Rank 1
russ asked on 04 Jun 2010, 05:18 PM
I've got a listbox populated from my database, and want to change the RadListBoxItem.Checked property (check or uncheck) whenever a user clicks anywhere on a row.  Is there an easy way to do this?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jun 2010, 07:28 AM
Hello,

Make use of RadListBox client side api to set the listitem as checked when selecting.

Here is the sample client code:
 
    function OnClientSelectedIndexChanged(sender, args) { 
        args.get_item().set_checked(!args.get_item().get_checked()); 
    } 

Feel free to change the logic based on your requirement. The following documentation lists the most important methods of the client-side RadListBox object:
RadListBox client API

-Shinu.
Tags
ListBox
Asked by
russ
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or