cancel
Showing results for 
Search instead for 
Did you mean: 

Read and obtain contents cells in only one row in Matrix

Former Member
0 Kudos
76

Hi,

They see the code below:

IU = oMatrix.Columns.Item("DSCardCode").Cells.Count - 1;

for (I = 1; I <= IU; I++ )

{

object val = oMatrix.Columns.Item("DSCardCode").Cells.Item(I).Specific;

oEditText1 = (SAPbouiCOM.EditText)val;

string valor = oEditText1.String;

}

this way I read all rows in only one column and obtained the values of each line of this column,

however I want to make is read the values of all columns in only one row and obtained content cells this row, somebody knows how to make......

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

You could use the GetNextSelectedRow to obtain the row and then obtain the values for that row, something like this (VB Code)

Dim intRow As Int16 = oMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder)
Dim oColumn As SAPbouiCOM.Column
For Each oColumn In oMatrix.Columns
     Select Case oColumn.UniqueID 
          Case "Col1"
               strValue = Val(oColumn.Cells.Item(intRow).Specific.Value)
          Case "Col2"
               strValue = CInt(Val(oColumn.Cells.Item(intRow).Specific.Value))
     End Select
Next

Answers (0)