Select row when you right-click to open context menu

Use two separate modules to close MSWord application for DataLoader and PDF Creation.
Use the Content DTS to determine ChangeBar status.
This commit is contained in:
Rich
2011-04-30 12:47:44 +00:00
parent b2e7b55bd8
commit 55eafe8115
4 changed files with 21 additions and 12 deletions

View File

@@ -220,6 +220,7 @@ namespace Sync
this.dgv.Name = "dgv";
this.dgv.Size = new System.Drawing.Size(759, 283);
this.dgv.TabIndex = 2;
this.dgv.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dgv_MouseDown);
this.dgv.ColumnWidthChanged += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgv_ColumnWidthChanged);
//
// cms

View File

@@ -46,6 +46,7 @@ namespace Sync
btnBrwsSS.Tag = this.tbSourceSafe;
btnBrwsMail.Tag = this.tbMailBox;
btnBrwsSSMail.Tag = this.tbSSMailBox;
}
private void btnBrowse_Click(object sender, EventArgs e)
{
@@ -423,5 +424,12 @@ namespace Sync
Clipboard.SetText(sb.ToString());
MessageBox.Show(sb.ToString(), "Copied to Clipboard", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void dgv_MouseDown(object sender, MouseEventArgs e)
{
dgv.ClearSelection();
DataGridView.HitTestInfo info = dgv.HitTest(e.X, e.Y);
dgv.CurrentCell = dgv[0, info.RowIndex];
dgv.Rows[info.RowIndex].Selected = true;
}
}
}