ParentID(pk) | ParentName| LeftChildID | RightChildID
and i want to display all data in tree view ;
like as
ParentName
|
|_LeftChildID
|_RightChildID
I was using
SqlDataAdapter dataAdapter = new SqlDataAdapter("Select * from tblTreeView", SqlCon); DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet); TreeView1.DataSource = dataSet.Tables[0]; TreeView1.DataBind();Then occur An error:- HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable. Please Give me a code How can i do this; Thank you Sir/Madam
SqlDataAdapter dataAdapter = new SqlDataAdapter("Select * from tblTreeView", SqlCon); DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet); TreeView1.DataSource = dataSet.Tables[0]; TreeView1.DataBind();