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

RadListBox with check boxes

1 Answer 73 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Ela
Top achievements
Rank 1
Ela asked on 03 Sep 2011, 12:58 AM

How to clear selection/uncheck the check boxes on the client side? The clearSelection() does not work.

Thank you.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Sep 2011, 06:13 AM
Hello Ela,
That the following client side code to achieve your requirement.

Javascript:
function Uncheck()
{
   var listBox = $find('<%= RadListBox2.ClientID%>');
   var items = listBox.get_items();
 
for (var i = 0; i < listBox.get_items().get_count(); i++)
     {
        if(items.getItem(1).get_checked())
         items.getItem(i).set_checked(false);
     }
}

Also take a look into the following help article for more on RadListBox client side API.
Client-side Basics
RadListBoxItem client API
RadListBox client API

Thanks,
Shinu.
Tags
ListBox
Asked by
Ela
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or