Check this logic it might helps u.
dsModules = bfOnlyMasterPage.GetModuleTreeViewList(cmnOnlyMasterPage);
DataTable dt=dsModules.Tables[0];
foreach (DataRow masterRow1 in dt.Rows)
{
TreeNode masterNode1 = new TreeNode((string)masterRow1["BillNO"], Convert.ToString(masterRow1["BillNO"]));
trView.Nodes.Add(masterNode1);
foreach (TreeNode tn in trView.Nodes)
{
DataRow[] drlevels = dsModules.Tables[0].Select("BillNO=" + tn.Value);
int i = 0;
foreach (DataRow drlevel in drlevels)
{
tn.ChildNodes.Add(new TreeNode(drlevel["OrderNo1 "].ToString(), drlevel["OrderNo1 "].ToString()));
i++;
}
}
}