Hola lo que quiero hacer es borrar los datos seleccionados en el datagriedview
lo que llevo de mi codigo boton "Quitar"(me da erores) en la linea
foreach(DataGridViewRow c in DataGridViewSelectionArea.Rows)
:
private void BtnQuitar_Click(object sender, EventArgs e)
{
foreach(DataGridViewRow item in DataGridViewSelectionArea.SelectedRows)
{
DataGridViewSelectionArea.RemoveAt(item.Index);
}
}
c.Cells[0].Value
, otra cosa no puedes afectar la colección a la que le haces unforeach
hablo de agregar o eliminar sus elementos.Does not contain a definition for 'Rows' and no extension method 'Rows' accepting a first argument of type Parrot.Common.CustomComponent.CustomDataGridView' Could be found ( are you missing a using directive or an assembly reference?)
NulReferenceException was unhandled Object reference not set to an instance of an object.