1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| int columnAjouter = (dgvJoueur.ColumnCount) - 1;
int columnSuppr = (dgvJoueur.ColumnCount) - 2;
DataGridViewCell myViewCell = dgvJoueur.CurrentCell;
for (int ligne = 0; ligne < dgvJoueur.RowCount; ligne++ )
{
for (int celulle = 0; celulle < dgvJoueur.CurrentRow.Cells.Count; celulle++)
{
if (myViewCell == dgvJoueur[columnAjouter, ligne])
{
string maCellule = (string)dgvJoueur.CurrentRow.Cells[celulle].Value;
if (maCellule.CompareTo(DBNull.Value) == 0)
{
MessageBox.Show("test");
}
} |
Partager