如何通过右键单击选择 datagridview 行?
最佳答案
使其行为类似于鼠标左键?例如
private void dataGridView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
dataGridView.CurrentCell = dataGridView[e.ColumnIndex, e.RowIndex];
}
}
关于.net - 右键单击选择 datagridview 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/173295/