direct mapping from treeview to datagridview

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 56
Reputation: karthi_selva is an unknown quantity at this point 
Solved Threads: 0
karthi_selva karthi_selva is offline Offline
Junior Poster in Training

direct mapping from treeview to datagridview

 
0
  #1
Feb 9th, 2009
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.)
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: direct mapping from treeview to datagridview

 
0
  #2
Feb 9th, 2009
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.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 56
Reputation: karthi_selva is an unknown quantity at this point 
Solved Threads: 0
karthi_selva karthi_selva is offline Offline
Junior Poster in Training

Re: direct mapping from treeview to datagridview

 
0
  #3
Feb 9th, 2009
hi,

i got some idea. if possible give some syntax. its useful for my reference.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 59
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: direct mapping from treeview to datagridview

 
0
  #4
Feb 9th, 2009
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.
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: direct mapping from treeview to datagridview

 
0
  #5
Feb 9th, 2009
if possible give some syntax. its useful for my reference.
As you understand the solution, coding is easier...
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum


Views: 1420 | Replies: 4
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC