Ver Mensaje Individual
  #22 (permalink)  
Antiguo 24/04/2011, 08:20
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 13 años, 5 meses
Puntos: 5
Respuesta: Suma grid segun filtro

SOLUCIONADO¡¡¡, lo pongo por si a alguien le interesa, soy un crack...jejeje

Public Sub sumatotal8()
Dim total As Decimal = 0
For Each row As DataGridViewRow In DgTotales.Rows
If row.Cells(4).Value IsNot Nothing Then
If row.Cells(6).Value IsNot Nothing Then
Dim iva As String = CType(row.Cells(6).Value, String)
If iva = "8" Then
End If
End If
Dim s As String = CType(row.Cells(4).Value, String)
DgTotales.Columns.Item("NombreFormaPago").DefaultC ellStyle.ForeColor = Color.Peru
If s <> "TARJETA CREDITO" Then
total = CDec(total + Val(row.Cells(1).Value) * Val(row.Cells(2).Value))
LbEfe8.Text = CStr(total.ToString("#,##0.00€"))
End If
End If
Next