Convertir un array en vector y llenar grilla
Dim vector As String() = {"SERGIO", "ANDRES", "ESTEBAN", "ROJELIO"}
Dim vector1 As Byte() = {1, 2, 3, 4}
Dim ds = New DataSet()
ds.Tables.Add("MiTabla")
ds.Tables("MiTabla").Columns.Add("ID", Type.GetType("System.Int32"))
ds.Tables("MiTabla").Columns.Add("NOMBRE", Type.GetType("System.String"))
'mas columnas
For i = 0 To vector.Length - 1
ds.Tables("Mitabla").Rows.Add(vector1(i), vector(i))
Next
GridView1.DataSource = ds
GridView1.DataBind()
Comentarios
Publicar un comentario