hai
Random deletion is not possible in FlexGrid, but you can delete rows selected continuosly, use the below code in the keydown event of the flexgrid
I think it will help u
'**********************************************************************
' sDeleteTraining (SUB)
'
' PARAMETERS:
' None
'
' DESCRIPTION:
' To delete the record partially from the grid Training
'**********************************************************************
Sub sDeleteTraining()
On Error Resume Next
Dim itraverse
Dim start, hcount
If mshfgTraining.RowSel > 0 And bDelQualify = False Then
For itraverse = 1 To mshfgTraining.Rows - 1
If mshfgTraining.Highlight Then
start = mshfgTraining.row
Exit For
End If
Next itraverse
hcount = mshfgTraining.RowSel
End If
Dim idRow, idCol As Integer ' vars for delrow and del column
idRow = 0
idCol = 1
With mshfgTraining
For itraverse = start To hcount
aDelTraining(idRow, idCol) = .TextMatrix(itraverse, 1)
aDelTraining(idRow, idCol + 1) = .TextMatrix(itraverse, 2)
aDelTraining(idRow, idCol + 2) = .TextMatrix(itraverse, 3)
'aDelTraining (idRow, idCol + 3) = .TextMatrix(itraverse, 4)
idRow = idRow + 1
idCol = 1
bDelTraining = True
Next itraverse
End With
iDelCountTraining = 0
For itraverse = start To hcount
mshfgTraining.TextMatrix(itraverse, 1) = ""
mshfgTraining.TextMatrix(itraverse, 2) = ""
mshfgTraining.TextMatrix(itraverse, 3) = ""
iDelCountTraining = iDelCountTraining + 1
Next itraverse
For itraverse = hcount To start Step -1
If mshfgTraining.Rows > 2 Then
If itraverse >= 1 Then mshfgTraining.RemoveItem (itraverse)
mshfgTraining.Highlight = flexHighlightNever
End If
Next itraverse
End Sub
=============
Regards
Mathi Krishna
KEEP SMILING TODAY AND ALWAYS