public void UnSelectItems() { RadTreeView_Category.UnselectAllNodes(); RadTreeView_Category.UncheckAllNodes(); //RadTreeView_Category.ClearSelectedNodes(); //RadTreeView_Category.ClearCheckedNodes(); }
private void SetCategoryID() { RadTreeNode selectednode = RadTreeView_Category.FindNodeByValue(_selected_categoryid); if (selectednode != null) { selectednode.Selected = true; ExpandSelectedNode(selectednode); } }
private void SetCheckedNodes() { string[] CheckedNodes = _checked_categoryid.Split(','); foreach (string CheckedNode in CheckedNodes) { RadTreeNode selectednode = RadTreeView_Category.FindNodeByValue(CheckedNode.Replace("\"", "")); if (selectednode != null) { selectednode.Checked = true; } } }
public void LoadCategoryRoot() { #region Default Setting RadTreeView_Category.EnableDragAndDrop = _enable_draganddrop; RadTreeView_Category.EnableDragAndDropBetweenNodes = _enable_draganddrop; RadTreeView_Category.CheckBoxes = _enable_checkbox; RadTreeView_Category.CheckChildNodes = _enable_checkbox; #endregion // Remove all Node before add new one RadTreeView_Category.Nodes.Clear(); RadTreeNode rootnode = new RadTreeNode(); if (_enable_homeroot) { rootnode.Text = "All Categories"; rootnode.Value = "-1"; rootnode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; rootnode.ImageUrl = "/App_Control_Style/NexusCore/Menu_TreeView/Icons/All_category.gif"; rootnode.Expanded = true; RadTreeView_Category.Nodes.Add(rootnode); } CategoryMgr myCategoryMgr = new CategoryMgr(); List <Category> myCategories = myCategoryMgr.Get_Categories(_root_categoryid); foreach (Category myCategory in myCategories) { int Item_Count = myCategoryMgr.Sum_CategoryItems(myCategory.CategoryID, _module_itemid); RadTreeNode node = new RadTreeNode(); node.Text = myCategory.Category_Name + " (" + Item_Count.ToString() + ")"; node.Value = myCategory.CategoryID; node.ImageUrl = "/App_Control_Style/NexusCore/Menu_TreeView/Icons/folder.gif"; LoadCategoryNode(node); if (_enable_homeroot) { rootnode.Nodes.Add(node); } else { RadTreeView_Category.Nodes.Add(node); } } if (_expand_allroot) { RadTreeView_Category.ExpandAllNodes(); } if (!DataEval.IsEmptyQuery(_selected_categoryid)) { SetCategoryID(); } if (_enable_checkbox) { SetCheckedNodes(); } }