本文整理汇总了C#中System.Web.UI.WebControls.TreeNodeEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# TreeNodeEventArgs类的具体用法?C# TreeNodeEventArgs怎么用?C# TreeNodeEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TreeNodeEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了TreeNodeEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TreeViewSitePages_TreeNodeDataBound
protected void TreeViewSitePages_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
{
if (!ShouldShowItem(e.Node.Text))
{
e.Node.Parent.ChildNodes.Remove(e.Node);
}
}
开发者ID:ASP-NET-Web-Forms,项目名称:Master-Chef,代码行数:7,代码来源:SiteMap.aspx.cs
示例2: treeMenu_TreeNodePopulate
protected void treeMenu_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
string userID = userEntity.UserID;
try
{
DataView dv = new DataView();
string parentId = e.Node.Value.ToString();
dv.Table = ProductTypeDataTable.Copy();
dv.RowFilter = "PSSMEPMC='" + parentId + "' and PSSMEUS='1'";
foreach (DataRowView drv in dv)
{
TreeNode node = new TreeNode();
node.Text = drv["PSSMEMN"].ToString();
node.Value = drv["PSSMEMC"].ToString();
node.PopulateOnDemand = true;
node.SelectAction = TreeNodeSelectAction.Expand;
node.NavigateUrl = drv["PSSMEMP"].ToString();
node.Target = drv["PSSMEOWT"].ToString();
e.Node.ChildNodes.Add(node);
}
}
catch
{
}
}
开发者ID:pcstx,项目名称:OA,代码行数:25,代码来源:leftmenutree.aspx.cs
示例3: TagTreeView_TreeNodeCheckChanged
protected void TagTreeView_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
{
if (e.Node.Checked)
PhotoLibrary.TagUserAuthorizations.AddTag(e.Node.Value);
else
PhotoLibrary.TagUserAuthorizations.RemoveTag(e.Node.Value);
}
开发者ID:BackupTheBerlios,项目名称:molecule-svn,代码行数:7,代码来源:Admin.aspx.cs
示例4: PopulateNode
protected void PopulateNode(Object source, TreeNodeEventArgs e)
{
TreeNode node = e.Node;
string value = e.Node.Value;
if (e.Node.Value == "~/Upload/")
{
e.Node.Value = Server.MapPath("~/Upload/");
}
String[] dirs = Directory.GetDirectories(node.Value);
// Enumerate directories
foreach (String dir in dirs)
{
TreeNode newNode = new TreeNode(Path.GetFileName(dir), dir);
if (Directory.GetFiles(dir).Length > 0 || Directory.GetDirectories(dir).Length > 0)
{
newNode.PopulateOnDemand = true;
}
newNode.Target = value + Path.GetFileName(dir)+"/";
node.ChildNodes.Add(newNode);
}
// Enumerate files
//String[] files = Directory.GetFiles(node.Value);
//foreach (String file in files)
//{
// TreeNode newNode = new TreeNode(Path.GetFileName(file), file);
// node.ChildNodes.Add(newNode);
//}
}
开发者ID:lengocluyen,项目名称:internetpark,代码行数:34,代码来源:ImageManager.ascx.cs
示例5: TreeView1_TreeNodeCheckChanged
protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
{
UpdateNode(e.Node, true);
CheckChilds(e.Node);
CheckParents(e.Node);
_context.SubmitChanges(ConflictMode.ContinueOnConflict);
}
开发者ID:dmziryanov,项目名称:ApecAuto,代码行数:7,代码来源:List.aspx.cs
示例6: TreeViewFiles_OnTreeNodePopulate
public void TreeViewFiles_OnTreeNodePopulate(Object sender, TreeNodeEventArgs e)
{
CmsDirectory dir = (CmsDirectory)CmsFile.FindByFileID(new Guid(e.Node.Value));
foreach (CmsDirectory sub in dir.Subdirectories) {
if (sub.State != CmsState.Deleted) {
AddDirectory(e.Node.ChildNodes, sub);
}
}
}
开发者ID:sffogg,项目名称:Xenosynth,代码行数:9,代码来源:FileExplorer.ascx.cs
示例7: TreeView1_TreeNodePopulate
protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
switch (e.Node.Depth)
{
case 0:
PopulateModels(e.Node);
break;
case 1:
PopulateModifications(e.Node);
break;
default:
// Do nothing.
break;
}
}
开发者ID:dmziryanov,项目名称:ApecAuto,代码行数:15,代码来源:List.aspx.cs
示例8: treeDept_TreeNodePopulate
protected void treeDept_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
PBDEPEntity[] deptArray = GetChild(e.Node.Value.ToString());
if (deptArray.Length > 0)
{
foreach (PBDEPEntity dept in deptArray)
{
TreeNode node = new TreeNode();
node.Text = dept.DeptName;
node.Value = dept.DeptCode;
node.PopulateOnDemand = true;
//node.SelectAction = TreeNodeSelectAction.Select;//None;
node.SelectAction = TreeNodeSelectAction.None;
node.NavigateUrl = dept.DeptCode;
e.Node.ChildNodes.Add(node);
}
}
}
开发者ID:pcstx,项目名称:OA,代码行数:18,代码来源:20101002.aspx.cs
示例9: treeView_TreeNodePopulate
protected void treeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
if (e.Node.Depth == 0)
try
{
string cmdTxt = "select ID, LoaiBC from DA_BC_LoaiBC where NhomBC=" + e.Node.Value;
if (e.Node.Value == "0")
cmdTxt = "select ma ID, ten LoaiBC from DA_DMNhom";
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset(cmdTxt);
TreeNode newNode;
foreach (DataRow dr in ds.Tables[0].Rows)
{
newNode = new TreeNode(dr[1].ToString(), dr[0].ToString());
e.Node.ChildNodes.Add(newNode);
}
}
catch { }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:19,代码来源:CNT_BAOCAO_LIST.ascx.cs
示例10: PopulateNode
/// <summary>
/// 动态加载树的代码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void PopulateNode(Object sender, TreeNodeEventArgs e)
{
SPFolder directory = SPContext.Current.Web.GetFolder(e.Node.Value);
if (directory.Exists)
{
//次级目录
Dictionary<string, SPFolder> subDirectories = sortFolders(directory.SubFolders);
foreach (KeyValuePair<string, SPFolder> pair in subDirectories.OrderBy(pair => pair.Key))
{
if (!pair.Value.Name.Equals("Forms", StringComparison.CurrentCultureIgnoreCase))
{
//OutputDirectory(pair.Value, node);
TreeNode childNode = new TreeNode();
childNode.Text = pair.Value.Name;
childNode.Value = pair.Value.Url;
childNode.Expanded = false;
childNode.Selected = false;
childNode.SelectAction = TreeNodeSelectAction.Expand;
// 设置通过Ajax动态获取节点
childNode.PopulateOnDemand = true;
childNode.Checked = false;
e.Node.ChildNodes.Add(childNode);
}
}
//该级目录下文件
Dictionary<string, SPFile> Files = sortFiles(directory.Files);
foreach (KeyValuePair<string, SPFile> pair in Files.OrderBy(pair => pair.Key))
{
TreeNode child = new TreeNode(pair.Value.Name);
child.NavigateUrl = pair.Value.ServerRelativeUrl;
child.Target = "_blank";
child.ImageUrl = "/_layouts/CAResources/themeCA/images/file.gif";
e.Node.ChildNodes.Add(child);
}
}
}
开发者ID:porter1130,项目名称:C-A,代码行数:47,代码来源:MarketingCommunication.aspx.cs
示例11: TreeView1_TreeNodeExpanded
protected void TreeView1_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
{
if (Page.IsPostBack) {
if (e.Node.Value.Length > 0) {
string[] info = e.Node.Value.Split('|');
int contentId = Convert.ToInt32(info[0]);
int pageId = Convert.ToInt32(info[1]);
if (pageId != 0) {
using (ISession session = HibernateHelper.GetSession().OpenSession()) {
ITransaction transaction = session.BeginTransaction();
try {
foreach (TreeNode nodo in e.Node.ChildNodes) {
string[] tmp = nodo.Value.Split('|');
int tmpCont = Convert.ToInt32(tmp[0]);
int tmpPage = Convert.ToInt32(tmp[1]);
List<Editor.BE.Model.Page> pgList = new List<Editor.BE.Model.Page>();
pgList = EditorServices.GetPageByParent(session, tmpCont, tmpPage);
foreach (Editor.BE.Model.Page pg in pgList) {
TreeNode nodePage = new TreeNode(pg.Publictitle, tmpCont.ToString() + "|" + pg.Pageid.ToString(), "~/img/cild.gif");
nodePage.Target = "mainFrame";
nodePage.NavigateUrl = "EditPage.aspx?id=" + pg.Pageid;
nodo.ChildNodes.Add(nodePage);
}
nodo.CollapseAll();
}
} catch (Exception ex) {
transaction.Rollback();
throw ex;
} finally {
session.Flush();
session.Close();
}
}
}
}
}
}
开发者ID:RIATEAM,项目名称:MYSTIC,代码行数:39,代码来源:TreeContent.aspx.cs
示例12: OnTreeNodeCheckChanged
protected virtual void OnTreeNodeCheckChanged (TreeNodeEventArgs e)
{
if (Events != null) {
TreeNodeEventHandler eh = (TreeNodeEventHandler) Events [TreeNodeCheckChangedEvent];
if (eh != null) eh (this, e);
}
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:TreeView.cs
示例13: treeView_TreeNodeCheckChanged
void treeView_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
{
SetNodeCheckStatus(e.Node, e.Node.Checked);
}
开发者ID:porter1130,项目名称:Medalsoft,代码行数:4,代码来源:NewsEditorPart.cs
示例14: TreeViewBookStore_TreeNodeCollapsed
protected void TreeViewBookStore_TreeNodeCollapsed(object sender, TreeNodeEventArgs e)
{
}
开发者ID:dchakov,项目名称:ASP.NET-Web-Forms-HM,代码行数:4,代码来源:TreeView.aspx.cs
示例15: tree_TreeNodePopulate
protected void tree_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
if (e.Node.Value.StartsWith("-"))
{
int itemTypeId = Utils.ParseInt(e.Node.Value.Substring(1), 0);
string[] items = ES.Services.Import.GetImportableItems(PanelSecurity.PackageId, itemTypeId);
foreach (string item in items)
{
TreeNode node = new TreeNode();
node.Text = item;
node.Value = itemTypeId.ToString() + "|" + item;
node.ShowCheckBox = true;
e.Node.ChildNodes.Add(node);
}
}
}
开发者ID:jordan49,项目名称:websitepanel,代码行数:17,代码来源:SpaceImportResources.ascx.cs
示例16: tvMenuItems_TreeNodeCheckChanged
protected void tvMenuItems_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
{
if(e.Node.ChildNodes.Count>0)
{
for (int i = 0; i < e.Node.ChildNodes.Count; i++)
{
e.Node.ChildNodes[i].Checked = e.Node.Checked;
}
}
}
开发者ID:chutinhha,项目名称:fixed-asset-system,代码行数:10,代码来源:Role_AddRight.aspx.cs
示例17: RefreshTreeView
private void RefreshTreeView()
{
TreeNode parent = PMTreeView.Nodes[0];
parent.ChildNodes.Clear();
TreeNodeEventArgs ea = new TreeNodeEventArgs(parent);
PopulateNode(this, ea);
}
开发者ID:huwred,项目名称:SnitzDotNet,代码行数:7,代码来源:PmViewAlt.ascx.cs
示例18: tree_TreeNodePopulate
protected void tree_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
LoadChildCategories(e.Node);
}
开发者ID:AzarinSergey,项目名称:learn,代码行数:4,代码来源:ProductsOnMain.aspx.cs
示例19: NodeChecked
protected void NodeChecked(object sender, TreeNodeEventArgs e)
{
bool check = false;
//if any nodes checked then show delete button
check = CheckAllNodes(PMTreeView.Nodes[0]);
ButtonDelete.Visible = check;
}
开发者ID:huwred,项目名称:SnitzDotNet,代码行数:7,代码来源:PmViewAlt.ascx.cs
示例20: Select_Change1
protected void Select_Change1(Object sender, TreeNodeEventArgs e)
{
string str_ID = "";
e.Node.Selected = true;
for (int i = 0; i < TreeView1.SelectedNode.ChildNodes.Count; i++)
{
if (i == 0)
{
str_ID += TreeView1.SelectedNode.ChildNodes[i].Value;
}
else if (i > 0)
{
str_ID += ", " + TreeView1.SelectedNode.ChildNodes[i].Value;
}
}
str_ID += ", " + TreeView1.SelectedValue.ToString();
DeviceObjectDataSource.SelectParameters["str_ID"].DefaultValue = str_ID;
GridDevice.DataBind();
}
开发者ID:AlekseyHamov,项目名称:dispokb,代码行数:19,代码来源:Device.aspx.cs
注:本文中的System.Web.UI.WebControls.TreeNodeEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论