
























private void BindDataToTree(TreeNodeCollection tns, string id, DataTable dt)
{
DataView dv = dt.DefaultView;
dv.RowFilter = "upNo=" + id;
TreeNode tn;
string strID;
foreach (DataRowView dr in dv)
{
strID = dr["no"].ToString();
if (strID != "")
{
tn = new TreeNode();
tn.Value = dr["no"].ToString();
tn.Text = dr["Name"].ToString();
tn.ImageUrl = "../images/Folder.gif";
tns.Add(tn);
BindDataToTree(tns[tns.Count - 1].ChildNodes, strID, dt);
}
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。