如何复制(重复) selectedCellsValue - 直到行尾。
一行中的单元格(即列)数 - 变化(约 30)。
Excel 有一个名为 - 自动填充 - 复制的选项。
这是我的尝试:
int x = dgv.SelectedCells.Count;
foreach (DataGridViewCell c in dgv.CurrentRow.Cells)
{
if (c.Selected == true)
{
string a = c.Value.ToString();
x = x+1;
dgvRasp.CurrentRow.Cells[x].Value = a;
}
}
但它只复制一次 selectedCells 。