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>