Skip to Content
0
Former Member
Sep 15, 2011 at 05:07 AM

Code Help Add Row

43 Views

Experts,

For Add row in matrix I have written

Case "AddRow"

Try

Dim omatrix As SAPbouiCOM.Matrix

omatrix = objform.Items.Item("mtx_0").Specific

If omatrix.RowCount > 0 Then

Dim rows As Integer = omatrix.RowCount

For i As Integer = 1 To rows

If omatrix.IsRowSelected(i) = True Then

Dim result As Integer

result = result = SBO_Appln.MessageBox("Do You Want to Add Row", 1, "Yes", "Cancel")

If result = 1 Then

omatrix.AddRow()

objform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE

Exit For

End If

End If

Next

End If

Catch ex As Exception

End Try

But it is not working. Please help. And how to have same feel like Std B1 where if we add row anywhere in matrix, it will take the exact row numbers and also we can add row anywhere in between not only for last row