0

// 遍历每一行的 lup foreach(dataGridView1.Rows 中的 DataGridViewRow 行){

                   if (dataGridView1.Rows[0].Cells["Payment"].Value.ToString()!="0")
              {


                        dataGridView1.Rows.Remove(row);

                       }
4

1 回答 1

0

Not sure but if you are removing rows while you cycle through them, you may be skipping rows. If you delete a row and then increment your index, you may skip the next row. Would you try cycling backwards through the table like this link suggests? Similar question

于 2014-06-22T21:51:44.947 回答