Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/11/2013, 12:46
panterozo
 
Fecha de Ingreso: octubre-2013
Mensajes: 8
Antigüedad: 10 años, 6 meses
Puntos: 0
Respuesta: Como sumar fila en un dataGridView

Cita:
Iniciado por caciro Ver Mensaje

If row IsNot Nothing Then
row.Cells("cantidad").Value = CInt(row.Cells("cantidad").Value) + 1
Else
Y has evaluado la variable row en el if?.. qué valor tiene?, ya que puede no estar entrando al if

Qué es lo que hace esta línea?
Cita:
Iniciado por caciro Ver Mensaje
Dim row As DataGridViewRow = DataListaVentas.Rows.Cast(Of DataGridViewRow).FirstOrDefault(Function(x) CInt(x.Cells("codigo").Value) = Convert.ToInt64(txtCodBarra.Text))