
Here i am having Root element as One If i select that i would like to make the first row of data grid view as selected. Like that if i select Child node i would like to make the 2nd row as selectable can any one help me

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hemant KumarRank #1,202 · 1.5K reputationPosted Oct 20, 2011, 1:37 AM EDT
Based on my understanding i found this
1) you need to map the nodes to corresponding datagrid rows
2) handle node click event and find corresponding row by id and select it
if (tvwACH.SelectedNode.Parent != null) { int id = (int)tvwACH.SelectedNode.Tag ; // make sure you've already assigned tag when creating Three nodes and data rows foreach(DataGridViewRow row in this.dataGridView1.Rows) { int rowId = (int)row.Tag ; if(rowId == id) { row.Selected = ture; } else { row.Selected = false; //discard other rows } } } For Reference check this link http://stackoverflow.com/questions/4343897/is-it-possible-to-select-both-treeview-node-and-the-row-of-a-datagridview http://www.codeproject.com/Answers/108651/How-to-make-the-particular-row-get-selected-in-dat.aspx#answer1