[原创]SAP Business One SDK 快速捕获Matrix中选择的行数据
GetNextSelectedRow Method
Code:
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
Code:Syntax
Public Function GetNextSelectedRow( _
Optional ByVal FirstRow As Long = 0, _
Optional ByVal OrderType As BoOrderType = 0 _
) As Long
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 |
1
int 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
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
2
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
3
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
4
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
5
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
6
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
7
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)