What you've actually forgotten to do is post your code so that we can help
you...
Heres what I'm doing to populatethe node. They all appear. The doPostBack
is running but no server side event fires.
private void loadMenu()
{
//clear up any existing nodes
TreeView1.Nodes .Clear();
// get the data for the nodes
SqlStatement query = new StoredProcedure (@"SelectMenu") ;
DataTable table = query.ExecuteDa taTable();
// process each parent tree node
foreach (DataRow dr in table.Rows)
{
if (dr["biParentSiteMa pNodeID"] == DBNull.Value)
{
TreeNode tn = new TreeNode(dr["vcTitle"].ToString(),
dr["biSiteMapNodeI d"].ToString());
AddChildMenuNod es(tn,table);
TreeView1.Nodes .Add(tn);
}
}
}
/// <summary>
/// recursive function to populate tree nodes
/// </summary>
/// <param name="tn">paren t tree node</param>
/// <param name="dt">compl ete datatable of all menu nodes</param>
private void AddChildMenuNod es(TreeNode tn, DataTable dt)
{
int parentID = Convert.ToInt32 (tn.Value); // parent id for who's
children we are looking
foreach (DataRow dr in dt.Rows)
{
if (dr["biParentSiteMa pNodeID"] != DBNull.Value)
{
if (Convert.ToInt3 2(dr["biParentSiteMa pNodeID"]) ==
parentID)
{
TreeNode newTreeNode = new
TreeNode(dr["vcTitle"].ToString(), dr["biSiteMapNodeI d"].ToString());
AddChildMenuNod es(newTreeNode, dt);
tn.ChildNodes.A dd(newTreeNode) ;
}
}
}
}