Ver Mensaje Individual
  #13 (permalink)  
Antiguo 17/03/2011, 09:03
Avatar de Aquaventus
Aquaventus
 
Fecha de Ingreso: junio-2010
Ubicación: Lima-Peru , En el alba de la naturaleza
Mensajes: 2.105
Antigüedad: 13 años, 10 meses
Puntos: 267
Respuesta: Datos duplicados en datagrid vb.net

Hola draco1103! Solucionado y probado en tu proyecto, este es el codigo :

Código vb.net:
Ver original
  1. Dim existe = False
  2.  
  3.         For Each row As DataGridViewRow In grilla_dia.Rows
  4.             If Convert.ToString(row.Cells(0).Value).Equals(grilla_menu.CurrentRow.Cells(2).Value) Then
  5.                 existe = True
  6.             End If
  7.         Next
  8.         If (existe = True) Then
  9.             MsgBox("Éste menú ya fué agregado", MsgBoxStyle.OkOnly, "INFORMACIÓN")
  10.         Else
  11.             grilla_dia.Rows.Add(grilla_menu.CurrentRow.Cells(2).Value, grilla_menu.CurrentRow.Cells(3).Value)
  12.  
  13.             toot = grilla_menu.CurrentRow.Cells("Valor").Value
  14.             tota = VALOR.Text
  15.  
  16.             k = (toot + tota)
  17.  
  18.             VALOR.Text = k
  19.         End If

Saludos!
__________________
Internet es tener todo el conocimiento global a tu disposición.
Desarrollo de Software - Ejemplos .Net