I try to delete multiple secected rows in a non dataaware grid, but nothing happens. Shift-F2 works, but not the function below. Get DeleteSelectedRow returns False.
What can be wrong?

Bengt

Code:
Procedure ProcessSelectionItems
    Integer[] SelRows
    Integer i iSels iRow
    Boolean bOk
    String sName
    Handle hoDataSource
    tDataSourceRow[] MyData

    Get GetIndexesForSelectedRows of oCJGrid1 to SelRows
    Get phoDataSource of oCJGrid1 to hoDataSource
    Get DataSource of hoDataSource to MyData
    Move (SizeOfArray(SelRows)) to iSels
    Move (iSels-1) to i

    While (i>=0)
        Move SelRows[i] to iRow
        Send SetSelectedRow iRow True
        Get DeleteSelectedRow to bOk  // Returns False
//        Send Request_Delete
        Decrement i
    Loop

//    For i from 0 to (iSels-1)   //This works!
//        Move SelRows[i] to iRow
//        Move MyData[iRow].sValue[2] to sName
//        Showln sName
//    Loop
End_Procedure