1
Aprender a programar desde cero / modficar celda en datagriview mediante UPDATE Visual Basic
« en: 08 de Enero 2017, 22:05 »
buenas tardes tengo un problema con la actualzaicion de datagridview mediante UPDATE ...
coloque un datagridview en un form3 donde me modifca toda la columna no solo la celda especifica....
cod:
foto:
https://social.msdn.microsoft.com/Forums/getfile/985445
https://social.msdn.microsoft.com/Forums/getfile/985446
archivo proyecto ....
https://1drv.ms/u/s!AmtavNxyY_MkhVpJktwLLYLMvmQF
me ayudan please....
coloque un datagridview en un form3 donde me modifca toda la columna no solo la celda especifica....
cod:
Código: [Seleccionar]
Public Class Form3
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Me.Close()
End Sub
Private Sub LISTABindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles LISTABindingNavigatorSaveItem.Click
Me.Validate()
Me.LISTABindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.STOCKDataSet)
End Sub
Private Sub Form3_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: esta línea de código carga datos en la tabla 'STOCKDataSet.LISTA' Puede moverla o quitarla según sea necesario.
Me.LISTATableAdapter.Fill(Me.STOCKDataSet.LISTA)
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
System.Diagnostics.Process.Start("D:\BASE DATOS\proyectoeligerm\proy\proy\bin\Debug\STOCK.xl sx")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim loFila As DataGridViewRow = Me.LISTADataGridView.CurrentRow()
MsgBox("Fila / registros eliminados", vbInformation, "correcto")
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
Me.LISTATableAdapter.BUSCAR2(Me.STOCKDataSet.LISTA , NOMTextBox.Text, DIMTextBox.Text)
MsgBox("Registro/s encontrado/s", vbInformation, "correcto")
End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.LISTATableAdapter.MODIFICAR2(NOMTextBox.Text, EXISTENTESTextBox.Text, NOMTextBox.Text)
Me.LISTATableAdapter.Fill(Me.STOCKDataSet.LISTA)
MsgBox("Modificación de registro exitosa", vbInformation, "correcto")
End Sub
Private Sub PrintGrid_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles PrintGrid.Click
PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles _
PrintDocument1.PrintPage
Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New _
Point(0, 0), Me.Size))
Me.InvokePaint(LISTADataGridView, myPaintArgs)
End Sub
End Class
foto:
https://social.msdn.microsoft.com/Forums/getfile/985445
https://social.msdn.microsoft.com/Forums/getfile/985446
archivo proyecto ....
https://1drv.ms/u/s!AmtavNxyY_MkhVpJktwLLYLMvmQF
me ayudan please....