private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex != -1) { DuplicateFileInfo d = dataGridView1.Rows[e.RowIndex].DataBoundItem as DuplicateFileInfo; var nodes = Candidates.Nodes.Find(d.Path, true); if (nodes.Length == 1) { Candidates.CollapseAll(); nodes[0].EnsureVisible(); Candidates.SelectedNode = nodes[0]; Files.SelectedItem = d.FileName; nodes = Where.Nodes.Find(d.FullPath, true); if (nodes.Length == 1) { tabControl1.SelectedTab = tabPage1; Where.Select(); nodes[0].EnsureVisible(); Where.SelectedNode = nodes[0]; } } } }