TreeNode parentNode = new TreeNode("Departments");
for(int i=0; i< 4; i++){ TreeNode childNode = new TreeNode(i.ToString()); parentNode.Nodes.add(childNode);} TreeViewControl.Nodes.add(parentNode)
private void tvDepartments_AfterCheck(object sender, TreeViewEventArgs e){ if (e.Node.Name.ToString() == "parentNode") { foreach (TreeNode item in e.Node.Nodes) { item.Checked = true; } } }