How to uncheck all checkboxes in a ListView

1 posts, 0 answers
  1. Jorge
    Jorge avatar
    1 posts
    Member since:
    Jan 2015

    Posted 27 Jan 2015 Link to this post

    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



Back to Top