Public Function getErrores(ByRef objGridView As GridView) As GridView
Dim iRow As Integer = 0
rstResult = getResult()
borrarGridView
objGridView.Columns.Count = rstResult.Fields.Count
objGridView.Rows.Height = 35
objGridView.Header = rstResult.Fields.Count
objGridView.Columns[0].Title = "Id"
objGridView.Columns[0].Width = 0
objGridView.Columns[0].Resizable = False
objGridView.Rows[0].TextAlignment = 3
objGridView.Columns[1].Title = "Estado"
objGridView.Columns[1].Width = 42
objGridView.Columns[1].Resizable = False
objGridView.Rows[1].TextAlignment = 3
objGridView.Columns[2].Title = "Fecha"
objGridView.Columns[2].Width = 80
objGridView.Columns[2].Resizable = False
objGridView.Rows[2].TextAlignment = 3
objGridView.Columns[3].Title = "Usuario"
objGridView.Columns[3].Width = 80
objGridView.Columns[3].Resizable = False
objGridView.Rows[3].TextAlignment = 3
objGridView.Columns[4].Title = "Formulario"
objGridView.Columns[4].Width = 80
objGridView.Columns[4].Resizable = False
objGridView.Rows[4].TextAlignment = 3
objGridView.Columns[5].Title = "Mensaje"
objGridView.Columns[5].Width = 150
objGridView.Columns[5].Resizable = False
objGridView.Rows[5].TextAlignment = 3
objGridView.Header = 3
objGridView.Header = GridView.Horizontal
rstResult.MoveFirst
Do While rstResult.Available
objGridView.Rows.Insert(iRow, 1)
objGridView[iRow, 0].Text = rstResult!Id
objGridView[iRow, 1].Text = rstResult!Estado
objGridView[iRow, 2].Text = rstResult!FechaMod
objGridView[iRow, 3].Text = rstResult!Usuario
objGridView[iRow, 4].Text = rstResult!Formulario
objGridView[iRow, 5].Text = rstResult!Mensaje
iRow += 1
rstResult.MoveNext
Loop
Return objGridView
End
Public Sub borrarGridView(ByRef objGridView As GridView)
Dim x As Integer
For x = objGridView.Rows.Count - 1 To Step -1
objGridView.Rows.Remove(x, 1)
Next
End
Public Sub Ejemplo1()
Dim miarray As Integer[] = [1, 2, 3]
Dim apararepetir As Integer[] = [4, 5, 6]
Dim i As Integer
Dim cuentaveces As Integer
cuentaveces = 3
For i = 1 To cuentaveces
miarray.Insert(apararepetir)
Next
End
Public Sub Ejemplo2()
Dim cadena As String = "1,2,3"
Dim insertar As String = ",4,5,6"
Dim amiarray As New String[]
Dim anumeros As Integer[]
'Uso del método estático String para repetir tantas veces como queramos la concatenación
'Concatenar todo lo anterior con la cadena que nos interesa
'Convertir cadena con caracter delimitador a array
amiarray = Split(cadena & String(3, insertar), ",")
'Conversión directa del array de tipo cadena a tipo entero
anumeros = amiarray.Copy()
' Print Object.Address(amiarray)
' Print Object.Address(anumeros)
End