| | |
direct mapping from treeview to datagridview
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 56
Reputation:
Solved Threads: 0
hi,
i am doing some windows application program using .net.
i show the information in treeview. when user selects the data from treeview. i like to show in datagrid view.
i do't know any direct mapping is present or not. if present please share ur ideas.
(now currently i m collect the tree node and add that information into datagridview.)
i am doing some windows application program using .net.
i show the information in treeview. when user selects the data from treeview. i like to show in datagrid view.
i do't know any direct mapping is present or not. if present please share ur ideas.
(now currently i m collect the tree node and add that information into datagridview.)
If you want to show detailed data on GridView based on master data on TreeView, say TreeView holds Car Models and you need when use selects Car Model from TreeView, its details shows in GridView.
You'd have DataSource which takes Car Model as a parameter, and assign GridView.DataSource to it, when user selects node send its name to the DataGrid DataSource to fill it.
You'd have DataSource which takes Car Model as a parameter, and assign GridView.DataSource to it, when user selects node send its name to the DataGrid DataSource to fill it.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Hi,
Use TreeView.AfterSelect event to fill the Grid, it gets fire when node has been selected. Here you can assign the data associated with selected node, to the GridView.
Use TreeView.AfterSelect event to fill the Grid, it gets fire when node has been selected. Here you can assign the data associated with selected node, to the GridView.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Indian Developer
http://falaque.wordpress.com/
•
•
•
•
if possible give some syntax. its useful for my reference.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
![]() |
Similar Threads
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
Other Threads in the C# Forum
- Previous Thread: Passing Variable to another form
- Next Thread: How I use IsMdiConteiner
| Thread Tools | Search this Thread |
.net access ado.net algorithm array asp barchart bitmap box broadcast buttons c# calculator check checkbox client column combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development display draganddrop drawing encryption enum event excel file form format formbox forms formupdate function gdi+ httpwebrequest image index input install java label linux list listbox mandelbrot math mouseclick mysql networking operator packaging parse path photoshop picturebox pixelinversion post programming radians regex remote remoting reporting richtextbox robot server sleep socket sql statistics stream string table text textbox thread time timer transform treeview update usercontrol validation visualstudio webbrowser wfa windows winforms wpf xml






