Hi friends
I have bounded a treeview to a DB. See there are 3 parent nodes. these parent nodes are having their subnodes even subnodes are having their sub nodes.
I have bound a grid view so that i can search my data thriugh selecting treeview nodes, subnodes.
As i told you before there are 3 parent nodes, when I select, suppose I select one parent nodes's subnode the it shows data in gridview which is related to this subnodes. it is fine.
means every indivisual node or sub node showing their related data.
Now what i want, I need that if you select a parent node1 then it should show all data related to node1 along with it's all subnodes and subnodes's nodes. Like if you select node1's subnode1 (not node1) then it should show
all data related to subnode1 along with subnode1's subnode.
in other way, you can say there are 3 main group every group is having their subgroups(any depth) so if you select any group or sub group then it should show all data related to selected group and its all subgroup's data
my current query is for searching
string strSql = "select a.MemberId,a.FirstName,a.LastName,a.Orgnization,a.City from mtblContacts as a INNER JOIN mtblGrpCon as b ON b.MemberId=a.MemberId and b.id=" + TreeView1.SelectedNode.Value + "";
and adding data to treeview i am using this
string strSql = "insert into mtblGrpCon(id,MemberId)values('" + TreeView2.SelectedNode.Value + "','" + Label1.Text + "')";
let me know please
thank you
never let you down..always be happy...