public DemoServerControl() { this.astvMyTree = new ASTreeView(); this.hfSelectedNodeText = new HiddenField(); this.hfSelectedNodeValue = new HiddenField(); this.btnPostBackTrigger = new Button(); }
private void updateAST(BJKCore.Cmd ast) { ASTreeView.Nodes.Clear(); ASTreeView.Nodes.Add(new CmdTreeNode("Program")); addASTNode(ASTreeView.TopNode as CmdTreeNode, ast); ASTreeView.ExpandAll(); }
public static void GenerarTreeTipoProductos(ASTreeView astvMyTree, bool Buscador) { ASTreeViewLinkNode n100 = new ASTreeViewLinkNode("Marcos", "100", "", "frm", "madera maciza", ""); n100.EnableCheckbox = Buscador; n100.EnableChildren = false; n100.EnableEditContextMenu = false; ASTreeViewLinkNode n400 = new ASTreeViewLinkNode("Mesas", "400", "", "frm", "", ""); n400.EnableCheckbox = Buscador; n400.EnableChildren = false; n400.EnableEditContextMenu = false; ASTreeViewLinkNode n500 = new ASTreeViewLinkNode("Sillas y Bancos", "500", "", "frm", "", ""); n500.EnableCheckbox = Buscador; n500.EnableChildren = false; n500.EnableEditContextMenu = false; ASTreeViewLinkNode n600 = new ASTreeViewLinkNode("Decoración", "600", "", "frm", "objetos decorativos", ""); n600.EnableCheckbox = Buscador; n600.EnableChildren = false; n600.EnableEditContextMenu = false; astvMyTree.RootNode .AppendChild((n100) .AppendChild(new ASTreeViewLinkNode("Madera Pinotea", "101", "", "frm", "madera maciza", "")) .AppendChild(new ASTreeViewLinkNode("Madera Cedro", "102", "", "frm", "", "")) .AppendChild(new ASTreeViewLinkNode("Vintage", "103", "", "frm", "madera maciza", "")) ) .AppendChild(new ASTreeViewLinkNode("Espejos", "200", "", "frm", "", "")) .AppendChild(new ASTreeViewLinkNode("Carteles", "300", "", "frm", "", "")) .AppendChild((n400) .AppendChild(new ASTreeViewLinkNode("Mesas Ratonas", "401", "", "frm", "Mesas Ratonas", "")) ) .AppendChild((n500) .AppendChild(new ASTreeViewLinkNode("Bancos Rústicos", "501", "", "frm", "En madera reciclada", "")) .AppendChild(new ASTreeViewLinkNode("Bancos Modernos", "502", "", "frm", "En madera reciclada", "")) ) .AppendChild((n600) .AppendChild(new ASTreeViewLinkNode("Peces", "601", "", "frm", "madera y metal", "")) .AppendChild(new ASTreeViewLinkNode("Barcos", "602", "", "frm", "madera y metal", "")) .AppendChild(new ASTreeViewLinkNode("Caras", "603", "", "frm", "madera y metal", "")) .AppendChild(new ASTreeViewLinkNode("Cuadros", "604", "", "frm", "madera y metal", "")) .AppendChild(new ASTreeViewLinkNode("Objetos Varios", "650", "", "frm", "madera y metal", "")) ); }
public static string TreeViewListaChilds(ASTreeView astvMyTree) { List<ASTreeViewNode> checkedNodes = astvMyTree.GetCheckedNodes(false); string lista = ""; foreach (ASTreeViewNode node in checkedNodes) { if (node.ChildNodes.Count == 0) { if (lista == "") { lista += node.NodeValue; } else { lista += ", " + node.NodeValue; } } } return lista; }
public static string TreeViewLista(ASTreeView astvMyTree) { List<ASTreeViewNode> checkedNodes = astvMyTree.GetCheckedNodes(false); string lista = ""; foreach (ASTreeViewNode node in checkedNodes) { //Nodos seleccionados if (lista == "") { lista += node.NodeValue; //"[" + node.NodeText + "-" + node.NodeValue + "]"; } else { lista += ", " + node.NodeValue; } } return lista; }