hii,
I want do add a function up and down on the rows of ultragrid in vb.net, by clicking on the up button the current row will be moved at the desired place. I have done it in the ASFlexgrid whose code is as follows:
Dim RowToMove As Integer, DestRow As Integer
Dim RowClip$
Dim MoveClip$
If DestRow > 0 Then
RowToMove = DestRow
Else
RowToMove = Grd1.Row
End If
DestRow = Grd1.Row - 1
With Grd1
If DestRow <= 0 Then Exit Sub
If DestRow = RowToMove Then Exit Sub
.Row = RowToMove
.Col = 0
.RowSel = RowToMove
.ColSel = .Cols - 1
'copy the whole row's data to a string
RowClip$ = .Clip
'delete the moved row
.RemoveItem(RowToMove)
'put the moved data to the new row
.AddItem(RowClip$, DestRow)
''.RowSel = 1
''.RowSel = DestRow
.Row = DestRow
.Col = 0
.RowSel = DestRow
.ColSel = .Cols - 1
''.RowSel = DestRow
.Redraw =
True
End With
I can try in the ultragrid and found the row drag and drop facility but it is working only on the non editable mode of the ultragrid but i want this in the editable grid so please suggest me a suitable way to achieve my goal.