datagridviewrow - How do i remove a row that is not equal to "0"? I tried this but it removes only 2 or 3 rows -



datagridviewrow - How do i remove a row that is not equal to "0"? I tried this but it removes only 2 or 3 rows -

// lup goes through every row foreach (datagridviewrow row in datagridview1.rows) {

if (datagridview1.rows[0].cells["payment"].value.tostring()!="0") { datagridview1.rows.remove(row); }

not sure if removing rows while cycle through them, may skipping rows. if delete row , increment index, may skip next row. seek cycling backwards through table link suggests? similar question

datagridviewrow

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -