como se hace esto? Me pueden ayudar por favor.
Pongo el código de como lleno mi datagrid.
Código
Imports SystemDesde ya muchas gracias.
Imports System.Data
Imports System.IO
Imports System.Data.SQLite
Imports System.Windows.Forms.SystemInformation
Public Class Form5
Dim cnnl As New SQLiteConnection
Public consulta As String
Dim Ada As New SQLiteDataAdapter()
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mySql As String
cnnl = New SQLiteConnection("Data Source=\BACKUP\BD\CLAS_MOBILE.db;Version=3;")
cnnl.Open()
mySql = "SELECT * FROM INS_INSPECCIONES_MOBILE_TMP"
DataGrid1.DataSource = RecogerConsulta(mySql)
End Sub
Public Function RecogerConsulta(ByVal mySql As String) As DataTable
Dim tmpTable As New DataTable
Try
Ada = New SQLiteDataAdapter(mySql, cnnl)
Ada.Fill(tmpTable)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error")
End Try
Return tmpTable
End Function
End Class
Se me olvidaba decir que es para una aplicación
.NET Compact Framework 2.0 para Windows CE 5.0










Autor


En línea




De esa forma (un poco digamos fea) mantienes la data INTEGRA. Cosa que luego tomas del ViewState, haces unboxing y no tienes que recorrer la tabla ni estar haciendo piruetas 

