Beispiel #1
0
		internal TreeNode() {
			this.id         = Tree.nextNodeId++;
			this.text       = null;
			this.data       = null;
			this.icon       = Tree.DefaultIcon;
			this.children   = new List<TreeNode>();
			this.expanded   = false;
			this.checkState = TreeNodeCheckState.no;
			this.treeIfRoot = null;
			this.parent     = null;
		}
Beispiel #2
0
		private void SetTreeNodeCheckStateDOM(TreeNode node, TreeNodeCheckState checkState) {
			Element nodeElem = GetNodeElement(node);
			if (nodeElem != null) {
				CheckBoxElement cb = (CheckBoxElement)jQuery.FromElement(nodeElem.Children[0]).Children("input").GetElement(0);
				cb.Indeterminate = (checkState == TreeNodeCheckState.indeterminate);
				cb.Checked = (checkState == TreeNodeCheckState.yes);
				cb.DefaultChecked = cb.Checked;
			}
		}
Beispiel #3
0
		public static void SetTreeNodeCheckState(TreeNode node, TreeNodeCheckState check) {
			Tree tree = GetTree(node);
			#if CLIENT
				if (tree != null && tree.isAttached && tree.hasChecks)
					tree.SetTreeNodeCheckStateDOM(node, check);
			#endif

			node.checkState = check;
			if (tree != null && tree.autoCheckHierarchy)
				tree.ApplyCheckHierarchy(node);

			#if CLIENT
				if (tree != null)
					tree.OnNodeChecked(new TreeNodeEventArgs(node));
			#endif
		}