protected void TreeView1_TreeNodeDataBound(object sender, TreeNodeEventArgs e) { if (e.Node.Text == "Food Lovers") { e.Node.Parent.ChildNodes.Remove(e.Node); } }
public void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { if (e.Node.Depth > 4) return; for (int n = 0; n < (e.Node.Depth+1) * 2; n++) { string label = string.Empty; if (e.Node.Depth < 1) label = "Node"; else label = e.Node.Text; if (Char.IsDigit(label.ToCharArray()[label.Length-1])) { label += " " + (char)(n + 65); } else { label += " " + n; } TreeNode nod = new TreeNode(label); //TreeNode nod = new TreeNode("Node " + e.Node.Depth + " " + n); nod.PopulateOnDemand = true; e.Node.ChildNodes.Add(nod); } }
protected void Treeview1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { if (base.IsCallback && (e.Node.ChildNodes.Count == 0)) { this.LoadChildNode(e.Node); } }
protected void MenuTreeView_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { int i = 0; if (e.Node.Parent == null) { i = this.MenuTreeView.Nodes.IndexOf(e.Node); } else { i = this.MenuTreeView.Nodes.IndexOf(e.Node.Parent); } Session["NodeIndex"] = i.ToString(); TreeNodeCollection ts = null; if (e.Node.Parent == null) { ts = ((TreeView)sender).Nodes; } else ts = e.Node.Parent.ChildNodes; foreach (TreeNode node in ts) { if (node != e.Node) { node.Collapse(); } } }
void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (e.Node.Value.EndsWith("\\")) { AddNodes(e.Node.Value, e.Node); } }
protected override void OnTreeNodeCollapsed(TreeNodeEventArgs e) { base.OnTreeNodeCollapsed(e); if (this.ShowNodeImages) { e.Node.ImageUrl = this.FolderClosedImage; } }
/// <summary> /// Raises the <see cref="E:System.Web.UI.WebControls.TreeView.TreeNodePopulate"/> event of the <see cref="T:System.Web.UI.WebControls.TreeView"/> control. /// </summary> /// <param name="e">A <see cref="T:System.Web.UI.WebControls.TreeNodeEventArgs"/> that contains event data.</param> protected override void OnTreeNodePopulate(TreeNodeEventArgs e) { base.OnTreeNodePopulate(e); int parentId = int.Parse(e.Node.Value); CreateChildNodes(e.Node.ChildNodes, parentId); }
protected void check_changed(object sender, TreeNodeEventArgs e) { string clickedNode = e.Node.Text; System.Diagnostics.Debugger.Break(); //System.Diagnostics.Debugger.Break(); txtnomCategoria.Value = clickedNode; }
protected void trvDept_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { strEmpArr = ""; foreach (TreeNode tn in trvDept.CheckedNodes) { strEmpArr += tn.Value + ";"; } }
protected void MainTree_TreeNodePopulate(object sender, TreeNodeEventArgs e) { if (_IsAjax) { //Ajax 才需動態產生子節點 BuildChildNode(e.Node); } }
protected void uxCategoryNavListTreeView_DataBound(object sender, EventArgs e) { TreeNodeEventArgs ee = (TreeNodeEventArgs)e; XmlElement xe = (XmlElement)ee.Node.DataItem; ee.Node.Text = xe.Attributes["DisplayThisText"].Value; ee.Node.SelectAction = TreeNodeSelectAction.Expand; }
protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { SetChildChecked(e.Node); if (e.Node.Parent != null) { SetParentChecked(e.Node); } }
protected void tree_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { foreach (TreeNode node in e.Node.ChildNodes) { CheckNode(node, e.Node.Checked); } mpeTree.Show(); }
protected void TreeView_Scope_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { //TreeNode senderNode = sender as TreeNode; //foreach (TreeNode n in senderNode.ChildNodes) //{ // n.Checked = senderNode.Checked; //} }
protected void onTreeNodeExpanded(object sender, TreeNodeEventArgs e) { e.Node.SelectAction = TreeNodeSelectAction.Expand; if (Request.Cookies[PREFIX + e.Node.Text] != null) { Response.Cookies[PREFIX + e.Node.Text].Value = "true"; } }
/// <summary> /// Called when the user expands a menu that hasn't been expanded before. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SubmitTree_TreeNodePopulate(object sender, TreeNodeEventArgs e) { string[] nodeData = e.Node.Value.Split(','); MenuType menuType = (MenuType)Int32.Parse(nodeData[0]); int menuID = Int32.Parse(nodeData[1]); string menuName = nodeData[2]; PopulateMenuNode(e.Node.ChildNodes, menuType, menuName, menuID); }
protected void treeDir_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { TreeNode tn = e.Node; if (tn.Checked == true) { TreeNodeCheck(tn); } }
protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { //TreeView1.TreeNodeCheckChanged -= new TreeNodeEventHandler(TreeView1_TreeNodeCheckChanged); //updateDownNodeCheckBox(e.Node, e.Node.Checked); //updateUpNodeCheckBox(e.Node, e.Node.Checked); //TreeView1.TreeNodeCheckChanged += new TreeNodeEventHandler(TreeView1_TreeNodeCheckChanged); }
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (e.Node.ChildNodes.Count > 0) { e.Node.ChildNodes.Clear(); DirectoryInfo dir = new DirectoryInfo(e.Node.Value); AppendSubNode(dir, e.Node); } }
private void RefreshTreeView() { TreeNode parent = PMTreeView.Nodes[0]; parent.ChildNodes.Clear(); TreeNodeEventArgs ea = new TreeNodeEventArgs(parent); PopulateNode(this, ea); }
protected void treeProductGroup_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { Controller.DeleteProductInGroups(ProductId); foreach (TreeNode node in treeProductGroup.CheckedNodes) { int ProductGroupId = Convert.ToInt32(node.Value.Substring(1)); Controller.NewProductInGroup(ProductId, ProductGroupId); } }
protected virtual void OnNodeRemoved(TreeNodeEventArgs e) { var handler = this.NodeRemoved; if (handler != null) { handler(this, e); } }
protected void rtvSiteMap_NodeCheck(object sender, TreeNodeEventArgs e) { TreeNodeCheck(e.Node); //Need to think about SettingAttribute thepermission //InititializeDBTree(); InititializeSiteMapTree(); }
private void OnNodeChanged(TreeNodeEventArgs e) { var handler = NodeChanged; if (handler != null) { handler(this, e); } }
//Обработка ивента изменения статуса ноды (открыта, закрыта), //отрабатывает когда пользователь открывает или закрывает ноду. //Изменившаяся нода добавляется в словарь состояния дерева (если она там уже была - сначала удаляется. protected void MyTreeView_TreeNodeStateChanged(object sender, TreeNodeEventArgs e) { if (treeViewState.ContainsKey(e.Node.Text)) { _ = treeViewState.Remove(e.Node.Text); } treeViewState.Add(e.Node.Text, e.Node.Expanded); }
protected void trvCategorias_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { OnTreeNodeCheckChanged(e); if (IsRadio) { hdnIdCategoriaRadio.Value = IdsCategoriasMarcadas.FirstOrDefault().ToString(); } }
protected void Tree1_NodeDataBound(object sender, TreeNodeEventArgs e) { XmlAttribute attr = e.XmlNode.Attributes["Highlight"]; if (attr != null && Convert.ToBoolean(attr.Value)) { e.Node.Text = String.Format("<span class=\"highlight\">{0}</span>", e.Node.Text); } }
protected void TrvCedentes_TreeNodePopulate(object sender, TreeNodeEventArgs e) { switch (e.Node.Depth) { case 0: FunLlenarCiudadCedente(e.Node); break; } }
protected void PopulateNode(Object sender, TreeNodeEventArgs e) { Debug.WriteLine("Begin PopulateNode"); Debug.WriteLine(e.Node.Value); AddNodes(e.Node.Value, e.Node.ChildNodes); Debug.WriteLine("End PopulateNode"); }
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (IsPostBack) { List<string> list = new List<string>(16); SaveTreeViewState(TreeView1.Nodes, list); Session["TreeViewState"] = list; } }
/// <summary> /// On populate create child nodes. /// </summary> protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e) { e.Node.ChildNodes.Clear(); e.Node.PopulateOnDemand = false; int postId = ValidationHelper.GetInteger(e.Node.Value, 0); // Set the ForumID if not set already if (ForumContext.ForumID == 0) { ForumPostInfo postInfo = ForumPostInfoProvider.GetForumPostInfo(postId); if (postInfo != null) { ForumContext.ForumID = postInfo.PostForumID; ForumID = postInfo.PostForumID; } } // Get child nodes SiteMapNodeCollection childNodes = MapProvider.GetChildNodes(postId, RegularLoad); int index = 0; foreach (ForumPostTreeNode childNode in childNodes) { int childNodeId = (int)((DataRow)childNode.ItemData)["PostID"]; if (childNodeId != postId) { TreeNode newNode = CreateNode(childNode, index); bool? originalExpanded = newNode.Expanded; // Force node to expand and load child posts if (DetailModeIE) { newNode.PopulateOnDemand = true; newNode.Expanded = true; } e.Node.ChildNodes.Add(newNode); // Restore original expanded state if (DetailModeIE) { newNode.Expanded = originalExpanded; } index++; } // Ensure there is only one 'click here for more' item if (UseMaxPostNodes && (MaxPostNodes > 0) && (index > MaxPostNodes)) { break; } } }
//展開TreeNode節點 protected void tvProduct_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (IsPostBack) { if (e.Node.Expanded == true) { WebMessageBox.MessageBox.Show("Hi...您展開了" + e.Node.Text + "節點!"); } } }
protected void Tv1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { if (IsCallback == true) { if (e.Node.ChildNodes.Count == 0) { LoadChildNode(e.Node); } } }
protected void TreeView1_TreeNodeDataBound(object sender, TreeNodeEventArgs e) { // // Make top-level TreeView nodes nonselectable. // if (e.Node.Depth == 0) { e.Node.SelectAction = TreeNodeSelectAction.None; } }
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { lstNodes = (List <Node>)Session["TreeNodes"]; if (lstNodes != null) { Node nd = lstNodes.Find(n => n.Id.ToString() == e.Node.Value); nd.IsExpanded = true; Session["TreeNodes"] = lstNodes; } }
protected void lnkCategoria_OnClick(object sender, EventArgs e) { var selectedNode = GetAllNodes().FirstOrDefault(node => node.Value == hdnIdCategoriaRadio.Value); if (selectedNode != null) { var args = new TreeNodeEventArgs(selectedNode); OnTreeNodeCheckChanged(args); } }
protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { for (int i = 0; i < 3; i++) { TreeNode newNode = new TreeNode(); newNode.Text = string.Format("动态加载的节点{0}", i); ////这里将新建的节点的PopulateOnDemand属性也设为True,将会形成一个无限递归 newNode.PopulateOnDemand = true; //TreeNodeEventArgs中的Node属性表示当前的节点 e.Node.ChildNodes.Add(newNode); } }
protected void tTV_TreeNodeCheckChanged1(object sender, TreeNodeEventArgs e) { TreeNodeCollection node = e.Node.ChildNodes; if (e.Node.Parent != null) { CheckNodeParent(e.Node, e.Node.Checked); } foreach (TreeNode item in node) { item.Checked = e.Node.Checked; CheckNode(item.ChildNodes, e.Node.Checked); } e.Node.ExpandAll(); }
private void OnParentRemovingChild(object sender, TreeNodeEventArgs e) { // Setup initial conditions. if (e.Node != node) return; // Slide the list-tree back to the next remaining parent. if (parentList.RootNode != null) { ITreeNode ancestor = Helper.Tree.FirstRemainingParent(parentList.RootNode, node); parentList.SelectedParent = ancestor ?? parentList.RootNode; } // The node for this panel has been removed. Dispose of the panel. Dispose(); }
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { TreeNodeCollection ts = null; if (e.Node.Parent == null) { ts = ((TreeView)sender).Nodes; } else ts = e.Node.Parent.ChildNodes; foreach (TreeNode node in ts) { if (node != e.Node) { node.Collapse(); } } }
protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e) { //判断当前选择了多少个节点 if (TreeView1.CheckedNodes.Count > 0) { Label1.Text = "当前选择了如下节点:: <br /><br />"; //CheckedNodes代表当前选择的节点的集合 foreach (TreeNode node in TreeView1.CheckedNodes) { Label1.Text += node.Text + "<br />"; } } else { Label1.Text = "没有节点被选择。"; } }
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (e.Node.Depth > 0) { if (e.Node.Depth == 1) { e.Node.ChildNodes.Clear(); SelectDvs sd = new SelectDvs(); DataSet ds = sd.Query(e.Node.Value); if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dataRow in ds.Tables[0].Rows) { TreeNode tv = new TreeNode(); tv.Value = Convert.ToString(dataRow["id"]); tv.Text = Convert.ToString(dataRow["Customername"]) + "<a target='right' href='ResEncoder.aspx?id=" + Convert.ToString(dataRow["id"]) + "'>编辑</a>"; TreeNode node = new TreeNode(); node.Text = ""; tv.ChildNodes.Add(node); tv.Expanded = false; e.Node.ChildNodes.Add(tv); } } } else if (e.Node.Depth == 2) { e.Node.ChildNodes.Clear(); SelectCameras sc = new SelectCameras(); DataSet ds1 = sc.Query(e.Node.Value); foreach (DataRow dataRow in ds1.Tables[0].Rows) { TreeNode tv = new TreeNode(); tv.Text = Convert.ToString(dataRow["dvsno"]) + "(" + Convert.ToString(dataRow["dvsport"]) + ")" + "<a target='right' href='ResCamera.aspx?id=" + Convert.ToString(dataRow["id"]) + "'>编辑</a>"; e.Node.ChildNodes.Add(tv); } } } }
protected void tvwMenu_TreeNodePopulate(object sender, TreeNodeEventArgs e) { if (e.Node.ChildNodes.Count == 0) { string[] nodevalue = e.Node.ValuePath.Split('/'); switch (nodevalue[0]) { case "tndSite"://控制中心 switch (e.Node.Depth)//节点深度 { case 0: CreateSiteCategories(e.Node); break; case 1: CreateProducts(e.Node); break; } break; case "tndMIU"://重点怀疑对象 switch (e.Node.Depth) { case 0: CreateMIUCategories(e.Node); break; case 1: CreateProducts(e.Node); break; } break; case "tndApp"://数据管理中心 //if (e.Node.Depth == 0) // CreateAppList(e.Node); break; case "tndSystem"://系统日志 break; } } }
/// <summary> /// Tree populate. /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Arguments</param> protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e) { OnNodePopulate(e.Node); }
/// <summary> /// 触发节点延迟加载事件 /// </summary> /// <param name="e">事件参数</param> protected virtual void OnNodeLazyLoad(TreeNodeEventArgs e) { EventHandler<TreeNodeEventArgs> handler = Events[_nodeLazyLoadHandlerKey] as EventHandler<TreeNodeEventArgs>; if (handler != null) { handler(this, e); } }
protected void tvRole_TreeNodeDataBound(object sender, TreeNodeEventArgs e) { SiteMapNode node = e.Node.DataItem as SiteMapNode; if (Security.IsDeniedURL(node.Url, txtTargetCode.Text)) e.Node.ShowCheckBox = false; if (string.IsNullOrEmpty(node.Url)) { e.Node.ShowCheckBox = false; e.Node.SelectAction = TreeNodeSelectAction.Expand; e.Node.Value = ""; } else { e.Node.Checked = !Security.IsDeniedURL(node.Url, txtTargetCode.Text, ddlRoles.SelectedValue); e.Node.NavigateUrl = string.Format("TaskSetting.aspx?url={0}&app={1}&role={2}&&TB_iframe=true&height=250&width=510", node.Url, txtTargetCode.Text, ddlRoles.SelectedValue); // e.Node.Value = node.Url; e.Node.SelectAction = TreeNodeSelectAction.Select; } }
private void AddZipsInZip(long id, TreeNodeEventArgs e) { EkJobDS.LocalizationJobFileDataTable dt = this.localizationApi.GetFilesInFile(id); foreach (EkJobDS.LocalizationJobFileRow data in dt.Rows) { e.Node.ChildNodes.Add(this.CreateZipNode(data)); } }
void TreeView1_TreeNodeCollapsed(object sender, TreeNodeEventArgs e) { //throw new Exception("The method or operation is not implemented."); }
protected void TreeViewSystemObject_Collapsed(Object sender, TreeNodeEventArgs e) { if (e.Node != null) { Nullable<bool> expandState = e.Node.Expanded; if (expandState.HasValue && !expandState.Value) { SetCurrNodeExpandState(e.Node); } //e.Node.Collapse(); } }
protected void TreeViewSystemObject_NodePopulate(Object sender, TreeNodeEventArgs e) { try { if (e.Node.ChildNodes.Count == 0) { FSEyeObject obj = AdminServer.TheInstance.SecurityManager.Get(int.Parse(e.Node.Value)); if (obj != null) { BuildObjectTree(e.Node, obj); } } } catch (Exception ex) { FSEye.Util.DebugLog(ex.ToString()); } }
protected void ProgramsTree_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (Request.Cookies["TreeState"] == null) { HttpCookie hc = new HttpCookie("TreeState"); hc.Expires = DateTime.Now.AddYears(1); hc.Value = ""; Response.Cookies.Add(hc); return; } string[] values = Common.Functions.nvl(Request.Cookies["TreeState"].Value, "").ToString().Split('|'); string Result = ""; foreach (string s in values) if (s != e.Node.Value) Result += s + "|"; Result = Result.Substring(0, Result.Length - 1); Response.Cookies["TreeState"].Expires = DateTime.Now.AddYears(1); Response.Cookies["TreeState"].Value = Result; }
protected void ProgramsTree_TreeNodeCollapsed(object sender, TreeNodeEventArgs e) { if (Response.Cookies["TreeState"] == null) { HttpCookie hc = new HttpCookie("TreeState"); Response.Cookies.Add(hc); } Response.Cookies["TreeState"].Expires = DateTime.Now.AddYears(1); Response.Cookies["TreeState"].Value = Request.Cookies["TreeState"].Value + "|" + e.Node.Value; }
protected void folderTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e) { PopulateSubfodlers(e.Node); }
protected void TOC_DataBound(object sender, TreeNodeEventArgs e) { try { if ((e != null) && (e.Node != null) && (Request.QueryString["content"] != null)) { if ((e.Node.Depth < 2) || (Request.QueryString["content"].Contains(e.Node.Text))) { e.Node.Expanded = true; } else { e.Node.Expanded = false; } } } catch { return; //sometimes e is in an invalid state } }
protected void TreeViewSystemObject_Expanded(Object sender, TreeNodeEventArgs e) { try { if (e.Node.ChildNodes.Count == 0) { FSEyeObject obj = AdminServer.TheInstance.SecurityManager.Get(int.Parse(e.Node.Value)); if (obj != null) { BuildObjectTree(e.Node, obj); SetCurrNodeExpandState(e.Node); } } //Nullable<bool> expandState = e.Node.Expanded; //if (expandState.HasValue && !expandState.Value) //{ // SetCurrNodeExpandState(e.Node); //} SetCurrNodeExpandState(e.Node); } catch (Exception ex) { FSEye.Util.DebugLog(ex.ToString()); } }
protected void treeMenu_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (e != null && e.Node != null && e.Node.Depth >= 2 ) { int treeType = PubClass.GetShort(ExtendMethod.GetPageParam(this,"TreeType")); switch (treeType) { case (int)MenuTreeTypeEnum.Menu: { } break; case (int)MenuTreeTypeEnum.Question: { } break; case (int)MenuTreeTypeEnum.Answer: { } break; default: break; } } }
protected void tvSiteMap_TreeNodePopulate(object sender, TreeNodeEventArgs e) { }
protected void modal_edit_treeview_TreeNodeCheckedChanged(object sender, TreeNodeEventArgs e) { if (e == null) return; if (e.Node == null) return; e.Node.Parent.CheckParent(); foreach (TreeNode c in e.Node.ChildNodes) c.CheckChildren(); }
protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e) { e.Node.ChildNodes.Clear(); e.Node.PopulateOnDemand = false; string nodePath = MediaLibraryHelper.EnsurePhysicalPath(e.Node.ValuePath); int rootEnd = nodePath.IndexOfCSafe('\\'); if (rootEnd > -1) { nodePath = nodePath.Substring(rootEnd + 1); } // Bind tree nodes if (String.IsNullOrEmpty(MediaLibraryPath)) { BindTreeView(RootFolderPath + DirectoryHelper.CombinePath(MediaLibraryFolder, nodePath), e.Node); } else { BindTreeView(DirectoryHelper.CombinePath(RootFolderPath, MediaLibraryPath, nodePath), e.Node); } }
private void AddXlfsInZip(long id, TreeNodeEventArgs e) { EkJobDS.LocalizationTargetDataTable dt = this.localizationApi.GetInterchangeFilesInFile(id); foreach (EkJobDS.LocalizationTargetRow data in dt.Rows) { e.Node.ChildNodes.Add(this.CreateXlfNode(data)); } }