[原创]SAP Business One SDK 快速捕获Matrix中选择的行数据

GetNextSelectedRow Method

Description

Returns the index of the selected rows on the matrix. You can get the selected rows by selection order (default) or by row order.

Syntax

Public Function GetNextSelectedRow( _
   Optional ByVal FirstRow As Long = 0, _
   Optional ByVal OrderType As
BoOrderType = 0 _
) As Long

Parameters

FirstRow
A long value specifying the first row from which to start searching.
OrderType
Sets the way in which the method returns results, as described below.
Member Description Value
ot_SelectionOrder Default. Results are returned by the selection order (0-based). 0
ot_RowOrder Results are returned by the row order (1-based). 1

Remarks

 

If no selection was found the method returns -1 in pVal parameter.

Default value of IRowStart parameter is 0, selection will be searched from the first row.

See Also

Matrix Object

Code:
1int row = oMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_SelectionOrder);                    
2                    while (row != -1)
3                    {
4                        string val = ((SAPbouiCOM.EditText)(oMatrix.Columns.Item("m4").Cells.Item(row).Specific)).String;
5                        
6                        row = oMatrix.GetNextSelectedRow(row, SAPbouiCOM.BoOrderType.ot_SelectionOrder);                        
7                    }
posted @ 2008-05-13 10:03  E.L.---黑者如斯夫,不舍昼夜......  阅读(1034)  评论(0编辑  收藏  举报