How to Check all the nodes in tree view with minimum complexity

Posted by Vinni on Stack Overflow See other posts from Stack Overflow or by Vinni
Published on 2010-05-20T09:06:09Z Indexed on 2010/05/20 9:10 UTC
Read the original article Hit count: 219

Filed under:
|

I need to check/select all the nodes in a tree view with minimum complexity. My tree view has 3 levels and many nodes in it. below is my code:

<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1" ShowCheckBoxes="All" ShowExpandCollapse="true"
            <DataBindings> 
                <asp:TreeNodeBinding DataMember="Category" TextField="Name" 
                    ValueField="Value" />
                <asp:TreeNodeBinding DataMember="LeafCategory" TextField="Name" 
                    ValueField="Value" />
                <asp:TreeNodeBinding DataMember="ChildCategory" TextField="Name" 
                    ValueField="Value" />
                <asp:TreeNodeBinding DataMember="SubCategory" TextField="Name" 
                    ValueField="Value" />
                <asp:TreeNodeBinding DataMember="Categories" TextField="Name" 
                    ValueField="Value" />
            </DataBindings>
        </asp:TreeView>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about treeview