cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete rows in system matrix

Former Member
0 Kudos

Hi Experts,

I'm trying to delete rows in Goods Receipt PO where base line = PO LineNum e.g rowcount = 5 and I want to delete row 1 & 5.

I have tried using deleterow and activemenuitem.

For i = oMatrix.VisualRowCount To 1 Step -1

If oMatrix.Columns.Item("46").Cells.Item(i).Specific.value = POLine Then

oMatrix.DeleteRow(i)

'SBO_Application.ActivateMenuItem("1293")

End If

Next

The deleterow method will delete the row correctly but the column # is not in sequence after deletion and I cannot edit column #.

If I use ActiveMenuItem, my sequence will be corrected but it delete incorrect row because oMatrix.Columns.Item("46").Cells.Item(i).Specific.value is getting incorrect row.

Rgds,

View Entire Topic
dengchd
Explorer
0 Kudos
oMatrix.Columns.Item("0").Cells.Item(i).Click(); oApplication.ActivateMenuItem("1293"); Above code should be in PressedAfter event instead in ClickAfter event of the button. In PressedAfter event, above code work perfectly.