//第三个节点
void PopulateProducts(TreeNode node)
{
DataTable dt = new DataTable();
QueryParam queryparam = new QueryParam();
queryparam.Add("ProductTypeItemID", QueryParam.RELATION.EQ, "" + node.Value + "");
dt = product.GetList(queryparam);
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
TreeNode NewNode = new TreeNode(row["ProductName"].ToString(), row["ProductID"].ToString(), "", "../WebProductDetaile.aspx?productID=" + row["ProductID"].ToString() + "", "");
//NewNode.PopulateOnDemand = false;
//NewNode.SelectAction = TreeNodeSelectAction.None;
NewNode.PopulateOnDemand =true ;
NewNode.SelectAction = TreeNodeSelectAction.Expand ;
node.ChildNodes.Add(NewNode);
node.Expanded = false;
}
}
}
}