cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a Multiple Rows Without Clearing Previous Row Details

Former Member
0 Kudos

Dear All,

I want to Add multiple rows at the same time in a matrix at the same time .My problem here is When i add the New rows to the matrix already added data need to remail in the matrix , I cant put Matrix.Clear or Datasource.clear.

When i add multiple rows previous row details is duplicated to next rows how to avoid thus

Mohamed

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

try this,

If (pVal.ItemUID = "BTNUID") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then

Dim fr As SAPbouiCOM.Form

Dim sel As Integer

Dim oMatrix1 As SAPbouiCOM.Matrix

fr = SBO_Application.Forms.Item(FormUID)

oMatrix1 = fr.Items.Item("mtx_136").Specific

fr.DataSources.DBDataSources.Item(2).Clear()

sel = oMatrix1.GetNextSelectedRow

oMatrix1.AddRow(1, sel)

End If

"mtx_136" is your matrix ID

and "BTNUID" is your button ID