Refresh Treenode parent to show most current child nodes
<p>I am able to select and expand to a particular tree node programmatically, but unable to refresh it to reflect most current data in the table. Is there Treeview1.Refresh() method ? or something like that to effect? any help will be appreciated. I have a treeview and I am adding child nodes to a parent node by having the user enter data and click on a button. After that insert into the table is done, I want the parent node to refresh and show all child entries.</p>

<pre><code>  protected void PopulateNode(Object sender, TreeNodeEventArgs e)
{

    switch (e.Node.Depth)
    {
        case 0:
            PopulateChild(e.Node);
            break;

        default:
            //PopulateChild(e.Node);
            break;
    }

}

protected void PopulateChild(TreeNode node)
{

    DataSet ResultSet = RunQuery("Select Id From tbl");

    if (ResultSet.Tables.Count &gt; 0)
    {
        foreach (DataRow row in ResultSet.Tables[0].Rows)
        {
            TreeNode newNode = new TreeNode();
            newNode.Text = row["Id"].ToString();
            newNode.Value = row["Id"].ToString();
            newNode.PopulateOnDemand = true;
            newNode.SelectAction = TreeNodeSelectAction.Expand;
            node.ChildNodes.Add(newNode);
        }

    }

}

DataSet RunQuery(String QueryString)
{
    String ConnectionString = "asdasdasdasd";




    OleDbConnection DBConnection = new OleDbConnection(ConnectionString);
    OleDbDataAdapter DBAdapter;
    DataSet ResultsDataSet = new DataSet();

    try
    {

        DBAdapter = new OleDbDataAdapter(QueryString, DBConnection);
        DBAdapter.Fill(ResultsDataSet);


        DBConnection.Close();

    }
    catch (Exception ex)
    {


        if (DBConnection.State == ConnectionState.Open)
        {
            DBConnection.Close();
        }

    }

    return ResultsDataSet;

}
</code></pre>
