void AddToolStripMenuItemClick(object sender, System.EventArgs e) { foreach (DataGridViewRow row in GacDataGridView.SelectedRows) { var newRow = new DataGridViewRow(); var cell = new DataGridViewTextBoxCell(); cell.Value = row.Cells[0].Value; newRow.Cells.Add(cell); cell = new DataGridViewTextBoxCell(); cell.Value = "GAC"; newRow.Cells.Add(cell); newRow.ContextMenuStrip = contextMenuStrip2; ReferenceDataGridView.Rows.Add(newRow); AddGacReference(row.Cells[0].Value as string); } ReferenceDataGridView.Sort(ReferenceDataGridView.Columns[0], ListSortDirection.Ascending); }
private void ReferenceDataGridView_MouseEnter(object sender, EventArgs e) { ReferenceDataGridView.Focus(); }