private void dgvTreeItems_RowEnter(object sender, DataGridViewCellEventArgs e) { DataGridView dgv = (DataGridView)sender; if (0 == dgv.SelectedRows.Count) { return; } //ITestFolder selected = (ITestFolder)dgv.Rows[e.RowIndex].DataBoundItem; //BOL.DA.TestFolders.Open(selected); //dgvFolderPermissions.DataSource = BOL.DA.CurrentTestFolder.Permissions; ITreeItems items = (ITreeItems)dgv.DataSource; ITreeItem selected = (ITreeItem)dgv.Rows[e.RowIndex].DataBoundItem; selected.Open(); if (null != BOL.DA.CurrentFolder) { dgvFolderPermissions.DataSource = BOL.DA.CurrentFolder.Permissions; } if (null != BOL.DA.CurrentContact) { dgvContactPermissions.DataSource = BOL.DA.CurrentContact.Permissions; } }