How to get the particular row get selected based on the selection of Nodes on a Treeview

Posted by Dora743 under C# on 11/13/2010 | Points: 10 | Views : 1241 | Status : [Member] | Replies : 1
I am doing an application in Windows Forms. I am having a tree view and a data-grid view on my form

My Tree view will be as follows

ACH
|->Some.txt
|->File Header
|->Batch Header
|->Batch1
|->Batch2
|->Batch3 and so on


My data grid view will consists of the data as follow

Record Type Content

File Header 111111111111111111111111111111111111111111111111111

Batch Header 1212132233243432454354543534565757657

Entry Detail 34354545646576856756765767868768

Batch control 11111111111111111111111111111111111111111111111111111111111

Batch Header 11111111111111111111111111111111111111111111

Entry detail 111111111111111111111111111111111111

Batch Control 111111111111111111111111111111111111111


Now if i select File Header from tree view i would like to select the row with file header as selected like that the others too any idea please

Dorababu


Responses

Posted by: Vuyiswamb on: 11/15/2010 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
mmh ok , its been long since i did windows application. on the Click event of the node
http://www.c-sharpcorner.com/uploadfile/scottlysle/treeviewbasics04152007195731pm/treeviewbasics.aspx

you can programatically select the row you want as depicted below

http://www.vcskicks.com/datagridview-selection.php


Thank you for posting at Dotnetfunda
[Administrator]

Dora743, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response