cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order Matrix

Former Member
0 Kudos
168

Hi guys,

I need some help with getting a row count from the Sales Order form in SBO 2007A with either C# or VB.NET 2005 code.

I have tried many iterations of code in the ItemEvent Handler but all have failed. Also once somethings happens in the Matrix (item number 38) i cant seem to process any other ItemEvents, it's as if it skips the procedure completely.

Please help.

Kind regards,

Akash

Edited by: Akash Singh on Jan 12, 2011 6:33 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member689126
Active Contributor
0 Kudos

Hi

Have you tried this

Dim RowCount As Integer
 Dim oMatrix As Matrix = form.Items.Item("38").Specific
 RowCount = oMatrix.RowCount 'OR
 RowCount = oMatrix.VisualRowCount

can you please post your code

Regards

Arun

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Can you please paste ypur code

Regards

Former Member
0 Kudos

Hi guys,

sorry for the delay was shifted to another project for a short period. please assist if you still can.

here is my code, as per Arun's suggestion above


 if (((pVal.FormType == 139 & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED)) & (pVal.Before_Action == true)))
            {
                if (pVal.ItemUID == "38")
                {
                    int rowCount = -1;
                    SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)form.Items.Item("38").Specific;
                    rowCount = oMatrix.VisualRowCount;
                    SBO_Application.MessageBox(rowCount.ToString(), 0, "", "", "");
                }
            }

I get no response when this code is executed.

Basically what I am trying to do is to see when the number of rows has changed and it should check this contineously.

your assistance is greatly appreciated.

akash

former_member689126
Active Contributor
0 Kudos

Hi

If you want get this you have to write code in the after menu click event. Because in sales order form the row is added or deleted through right click menu , so you have to catch the add row and delete row menu event and write your code.

Regards

Arun