on 08-05-2004 4:23 AM
Hi All,
I am tring to get the total number of rows contained in the Sales Order Matrix. Does the rowcount property work?
I have tried the mymatrix.rowcount -1 but i always get 0 even after an event and the matrix contains many rows?
Code snippet:
'//VB.NET
'Other declarations assumed
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
Dim iRow As Integer
Dim oMtx As SAPbouiCOM.Matrix
Dim oForm As SAPbouiCOM.Form
Dim iCol As Integer
Dim sCellValue As String
If pVal.FormType <> 0 And pVal.Before_Action = False Then
Select Case pVal.EventType
Case APbouiCOM.BoEventTypes.et_LOST_FOCUS
Select Case pVal.ItemUID
Case SALES_GRID_MTX '38
iRow = pVal.Row
iCol = pVal.ColUID
If iCol = 1 Then
Dim iRowCount As Integer = 0
oForm = SBO_Application.Forms.Item(FormUID)
oMtx = oForm.Items.Item(SALES_GRID_MTX).Specific
iRowCount = oMtx.RowCount
sCellValue = oMtx.Columns.Item(1).Cells.Item(iRow).Specific.Value 'Works, no problem here
SBO_Application.MessageBox(iRowCount)
End If
End Select
End Select
End If
end sub
Regards Rayner
You haven't listed the definition of SALES_GRID_MTX in your code. I suspect you might have defined this as a numeric type, and that is probably the cause. It should be the string value "38", not the number 38.
Regards,
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DOH!!!!!
Right you are )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
7 | |
6 | |
3 | |
3 | |
3 | |
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.