treeview生成树.docx 亲测可用

时间:2016-12-31 05:00:48
【文件属性】:

文件名称:treeview生成树.docx 亲测可用

文件大小:68KB

文件格式:DOCX

更新时间:2016-12-31 05:00:48

treeview

c# treeview生成树.docx 亲测可用 截一小段代码 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { db sdb = new db("bests"); DataView dv = sdb.sdt("select * from company"); foreach (DataRowView datav in dv) { TreeNode tn = new TreeNode(); tn.Text = datav["name"].ToString(); tn.Value = datav["companyid"].ToString(); tn.Expanded =false; tn.ImageUrl = "images/j.gif"; // tn.ExpandedImageUrl = "images/1.jpg";//展开节目显示图片 // tn.SelectedImageUrl = "images/1.jpg";// this.TreeView1.Nodes.Add(tn); addchildnode(tn); } }


网友评论