读书人

DataGridView右键选中国人民银行

发布时间: 2012-12-26 14:39:28 作者: rapoo

DataGridView右键选中行

?

private void dgvCatelogList_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)?? ? ? ?{?? ? ? ? ? ?if (e.Button == MouseButtons.Right && e.RowIndex > -1 && e.ColumnIndex > -1)?? ? ? ? ? ?{?? ? ? ? ? ? ? ?dgvCatelogList.CurrentRow.Selected = false;?? ? ? ? ? ? ? ?dgvCatelogList.Rows[e.RowIndex].Selected = true;?? ? ? ? ? ?}?? ? ? ?}

读书人网 >编程

热点推荐