'Recorrer los valores de una Columna Dim Valor As String Dim Col As Integer = [Link].
ColumnIndex For Each row As DataGridViewRow In [Link] Valor = [Link](Col).Value Next
Para recorrer las filas de un datagrid el cdigo seria algo asi: for(int i=0; i<[Link];i++) { for(int j=0; j<[Link][i].[Link]; j++) { string valor = [Link][i].Cells[j].Text; } }
Dim i As Integer For i = 0 To selectedRowCount - 1 'falta aca Next Dim x As Integer For x = 0 To [Link] Dim sel = [Link](x).Cells(0).Value() MsgBox("valor de la celda: " & sel) Next
Public Class Form1 Class persona Private xEstado As Boolean Public Property Estado() As Boolean Get Return xEstado End Get Set(ByVal value As Boolean) xEstado = value End Set End Property End Class
Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim xPer1 As New persona Dim xPer2 As New persona [Link] = True [Link] = False Dim xPersonas As New List(Of persona) [Link](xPer1) [Link](xPer2) [Link] = xPersonas For index As Integer = 0 To [Link] - 1 Dim xValor As String = [Link](index).Cells(0).[Link]() [Link]("El valor es: " & xValor) Next End Sub End Class
Private Sub Button9_Click(ByVal sender As [Link], ByVal e As [Link]) Handles [Link] Dim conn As New MySqlConnection Dim myCommand As New MySqlCommand [Link] = myConnString [Link] = conn [Link] = ("INSERT INTO tallerbd.serv_preventivo (unidad, engrasado, motor, diferencial, transmision, comentario, quien) values ('" & [Link] & "', '" & Format([Link], "yyyy/MM/dd") & "', '" & Format([Link], "yyyy/MM/dd") & "', '" & Format([Link], "yyyy/MM/dd") & "', '" & Format([Link], "yyyy/MM/dd") & "', '" & [Link] & "')") Try [Link]() [Link]() MsgBox("GUARDADO") Catch myerror As MySqlException MsgBox("Error al actualizar la base de datos: " & [Link]) End Try End Sub