Add a
TreeNodeCheckChanged
Event Handler to
TreeView
control and on
PostBack
you will get the selected node value and full path as follows:
protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
{
string nodePath = e.Node.ValuePath;
string nodeValue = e.Node.Value;
}
Based on the
nodeValue
selection (Or,
nodePath
selection) you retrieve data from the database and populate in the
GridView
.
You can see a number of examples of TreeView here :
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/navigation/treeview.aspx[
^]