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

How to uncheck all checkboxes in a ListView

0 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jorge
Top achievements
Rank 1
Jorge asked on 27 Jan 2015, 06:06 PM
Hello there!

So I am trying to uncheck all checkboxes of my listview but I don't know if there is an option as .clearSelection(); but for checkboxes, or anyway to loop through all elements in my listview and uncheck them.

My listview:

                        <td>
                            <telerik:RadListBox ID="rlbExample"
                                    SelectionMode ="Multiple"
                                    OnClientSelectedIndexChanged="OnClientSelectedIndexChanged"
                                    Width="160px" 
                                    DataTextField="ExampleGroupDesc" 
                                    CheckBoxes ="true" 
                                    DataValueField="ExampleGroupCode" 
                                    runat="server" />                        
                        </td>      

And the javascript that does unselect all elements but not uncheck all checkboxes:

    function listboxClicked(lbclicked) {
        var rlbExample= $find("<%=rlbExample.ClientID%>");

        if (lbclicked == rlbExample)rlbExample.clearSelection();
    }     

Kind regards and thanks in advance,

Jorge



Tags
General Discussions
Asked by
Jorge
Top achievements
Rank 1
Share this question
or