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 : 1435 | 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

|->File Header
|->Batch Header
|->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



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

mmh ok , its been long since i did windows application. on the Click event of the node

you can programatically select the row you want as depicted below

Thank you for posting at Dotnetfunda

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

Login to post response