DataGridView右键选中某单元格-C#
//添加下面事件即可private void DataGridView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.RowIndex >= 0)
{
if (e.Button == System.Windows.Forms.MouseButtons.Right)
{
this.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected = true;
}
}
}
posted @ 2007-10-04 19:09 Jackey 阅读(390) 评论(0) 编辑
