Mover filas en DataGrid

Medano
16 de Octubre del 2003
Buenas tardes,

alguien sabe como puedo cambiar las filas del datagrid de posición, que el usuario las pueda mover arriba o abajo como desee. Lo bueno sería que seleccionasa una fila y luego con dos botones la bajara y subiera,

Muchas gracias y saludos,

Pedro

Mauricio Dur?T.
16 de Octubre del 2003
Aqui tienes un codigo fuente que ocupop para moverme dentro de un grid (selecciono la celda con el mouse y acepto con enter)

Private Sub MSFlexGrid1_Click()
With MSFlexGrid1
If .CellWidth = 1 Then Exit Sub
Text9.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth, .CellHeight
End With
End Sub
----------------------------------
Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
k = k + 1
Text9 = k + 1
Text9.Visible = True
Text9.SetFocus
Text9 = ""
End Sub
------------------------------------


Private Sub Text9_Change()
If KeyAscii = 13 Then
MSFlexGrid1.Text = Text9
Text9.Visible = False
End If

End Sub
-----------------------
Private Sub Text9_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
MSFlexGrid1.Text = Text9
Text9.Visible = False
End If
End Sub

----------------

Espero que te sirva :---)

Mauricio Dur?T.
16 de Octubre del 2003
Aqui tienes un codigo fuente que ocupop para moverme dentro de un grid (selecciono la celda con el mouse y acepto con enter)

Private Sub MSFlexGrid1_Click()
With MSFlexGrid1
If .CellWidth = 1 Then Exit Sub
Text9.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth, .CellHeight
End With
End Sub
----------------------------------
Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)
k = k + 1
Text9 = k + 1
Text9.Visible = True
Text9.SetFocus
Text9 = ""
End Sub
------------------------------------


Private Sub Text9_Change()
If KeyAscii = 13 Then
MSFlexGrid1.Text = Text9
Text9.Visible = False
End If

End Sub
-----------------------
Private Sub Text9_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
MSFlexGrid1.Text = Text9
Text9.Visible = False
End If
End Sub

----------------

Espero que te sirva :---)

Ojo tienes que colocar un text en el formulario, con un color cualesquiera para poderte mover dentro de la grilla