FOREACHでDataGridViewの次の行の値を取得するにはどうすればよいですか?
foreach (DataGridViewRow row in dataGridViewSelection.Rows)
{
if ((bool)((DataGridViewCheckBoxCell)row.Cells[3]).Value)
{
do
{
list.Add(row.Cells[1].Value.ToString());
}
while (row.Cells[2].Value == the next row.Cells[2].Value-->of the next row);
}
}
次の行の同じセルの値を取得して、それらを比較できるようにします。ありがとうございました