【发布时间】:2016-06-12 03:42:07
【问题描述】:
如何在 2 个数据网格视图中选择多行,如屏幕截图所示? Example 我做了 1 行:
private void dataDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
Selection();
}
private void Selection()
{
table2DataGridView.ClearSelection();
int selected = Convert.ToInt32(table1DataGridView.CurrentRow.Index);
if (table1DataGridView.Rows.Count != 0)
{
table2DataGridView.Rows[selected].Selected = true;
}
}
但不知道如何处理多行。
【问题讨论】:
标签: c# winforms datagridview