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.)

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.

hi,

i got some idea. if possible give some syntax. its useful for my reference.

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.

if possible give some syntax. its useful for my reference.

As you understand the solution, coding is easier...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.