on 05-04-2006 12:54 AM
Hello,
I am having a problem saving Rows from a Matrix with a User Defined Object. The following is the code I am using.
Private Sub applic_ItemEvent(ByVal FormID_Sap As_
String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef_ BubbleEvent As Boolean) Handles applic.ItemEvent
Dim FormUID1 As String
FormUID1 = FormID_Sap
If ((formuid1 = "MyForm") And (pVal.ItemUID = "AddRow")_
And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK)_
And (pVal.Before_Action = False)) Then
Dim oMatrix1 As SAPbouiCOM.Matrix
Dim SBOForm1 As SAPbouiCOM.Form
SBOForm1 = pApp.Forms.Item(formuid1)
oMatrix1 = SBOForm1.Items.Item("20").Specific
oMatrix1.AddRow()
End If
I know AddRow has 2 parameters I can send it, but they all seem to give me the same result in trying the following.
.AddRow(1)
.AddRow(1,2)
Row 1 is being duplicated to Row 2 when I click on the button. It also does not save the data from Row 2.
BTW: I did try the Sample UDO Code for the MealOrder Sample and it gave me the same problem.
Thank you in Advance for any help.
Paul
Hello Paul,
You must bind the matrix into a UserDataSource. Then Supply first the needed values in the UserDataSource before calling the function AddRow of the matrix so it will not duplicate the row above it. Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.