|
-
Dec 13th, 2010, 01:10 AM
#1
Thread Starter
Addicted Member
Click on TreeView nodes display data on GridView.
Hi,
Present i am working on TreeView Control.
By using Treeview control i want to show the data on the DataGridView2.
This data is coming from DataGridview1 which is hide on the output.
When i click on the selected node that perticular node is connect to suitable data on the datagridview1. Then that data or that Row is display on the Datagridview2.
Example:
Assume in my Datagridview1 the first column is contains data 3101,3102,3103.....
In my Treeview control i added nodes like 3101,3102,3103.......
So when i select or click the 3101, that is connect to 3101 Row in the DataGridview1. That hole row is dislay on the DataGirdview2.
I hope u understand my problem.
Regards
Kumar.
-
Dec 13th, 2010, 01:34 AM
#2
Re: Click on TreeView nodes display data on GridView.
You don't need two grids. A grid is for display and input purposes, not storage. If the first grid isn't being displayed to the user then get rid of it. Just store the data in a DataTable or some other list. On the AfterSelect event of the tree, you can get the appropriate record from the list and display it in the one and only grid. If you use a DataTable, you can also bind the entire table to the grid via a BindingSource and then set the BindingSource's Filter property to hide all but the desired row.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|