我怎样才能在我的FORACH里 拿到我数据GridView下一排的值?
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);
}
}
I want to obtain the value of the same cell in the next row so i can compare them. Thank you