Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/11/2008, 12:26
Avatar de agressor
agressor
 
Fecha de Ingreso: noviembre-2007
Ubicación: Knocking the Death Door..
Mensajes: 368
Antigüedad: 16 años, 5 meses
Puntos: 3
Respuesta: Actualizar datagrid en tiempo de ejecucion.

Hola puedes crear una funcion que te llene el DataGrid y luego cuando haga algun cambio te lo llene.. te pongo un ejemplo de una que yo utilizo..

Public Sub LlenarGrid(ByRef nombregrid As DataGridView)
Dim conn As New System.Data.Odbc.OdbcConnection(My.Settings.CnxDB)
Dim myCommand As New System.Data.Odbc.OdbcCommand
Dim myAdapter As New System.Data.Odbc.OdbcDataAdapter
Dim myData As New DataSet
Dim SQL As String

SQL = ""

myCommand.Connection = conn
myCommand.CommandText = SQL

myAdapter.SelectCommand = myCommand
myAdapter.Fill(myData, "Tabla")
nombregrid.DataSource = myData.Tables(0)
End Sub

Salu2..!! Prueba y me cuentas..
__________________
Somos lo que nosotros queremos ni mas ni menos..
No hay dia mas perdido que aquel en que no hemos reido..
La vida es tal y como debe ser...
Nadie vivira por ti...