hola a todos!!!!
disculpen tengo un problema y talvez me puedan ayudar. no se que es lo malo q tengo en mi codigo.
quiero agregar una fila en el detalle de factura(se agrega la primera vez los datos) pero ya despues solo me agrega filas vacias!!!
no se a que se debe. espero me den una mano11
gracias
If Me.DataGridView1.Rows.Count > 0 Then
                If Me.cboProducto.SelectedValue = Me.DataGridView1.Rows(Me.DataGridView1.Rows.Count - 1).Cells(0).Value Then
                    MsgBox("Producto ya agregado, por favor seleccione otro", MsgBoxStyle.Critical, "Error")
                Else                 
                    Me.DataGridView1.Rows(Me.DataGridView1.RowCount - 1).Cells(0).Value = Me.cboProducto.SelectedValue
                    Me.DataGridView1.Rows(Me.DataGridView1.RowCount - 1).Cells(1).Value = Me.txtCantidadPedida.Value
                    Me.DataGridView1.Rows(Me.DataGridView1.RowCount - 1).Cells(2).Value = Me.txtPrecioUnitario.Text.ToString
                    Me.DataGridView1.Rows(Me.DataGridView1.RowCount - 1).Cells(3).Value = Me.txtMonto.Text                  
                    Me.DataGridView1.Rows.Add()
                End If