Visual Basic para Aplicaciones - datagrid

Life is soft - evento anual de software empresarial
 
Vista:

datagrid

Publicado por Orlando (1 intervención) el 16/11/2004 15:31:50
espero te sirva esto

Private Sub Form_Load()
MATRIZ_CABECERA
LLENA_MATRIZ
End Sub

Public Sub MATRIZ_CABECERA()
With fxascenso
.Cols = 10
.Rows = 1
.Font.Bold = True
.Font.Size = 9
.TextMatrix(0, 0) = "FILA"
.TextMatrix(0, 1) = "codigo"
.TextMatrix(0, 2) = "APELLIDOS Y NOMBRES"
.ColWidth(0) = 700
.ColWidth(1) = 9000
End With
End Sub

Public Sub LLENA_MATRIZ()
Dim MFILA As Integer
Mar = "007"
Mgr = "005"
R1 = "select eliminado,tercio1,tercio2,tercio3,RAYA_AN from nt_valores where ARMA='" & Mar & "' and GRADO='" & Mgro & "'"
RS.Open R1, cn
If Not RS.EOF Then
RS.MoveFirst
Do While Not RS.EOF
MFILA = fxascenso.Rows
fxascenso.Rows = MFILA + 1
fxascenso.TextMatrix(MFILA, 0) = MFILA
fxascenso.TextMatrix(MFILA, 1) = RS("CODIGO")
fxascenso.TextMatrix(MFILA, 2) = RS("APENOMBRES")
RS.MoveNext
Loop
End If
RS.Close
End Sub

Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder