Mig*_*iro 3 c# user-interface sapb1
我正在尝试从矩阵中读取。到目前为止,我拥有的代码是:
SAPbouiCOM.Matrix matrix = (SAPbouiCOM.Matrix SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
SAPbouiCOM.Column col = matrix.Columns.Item("1") ;
SAPbouiCOM.Cells cells = col.Cells;
String cell = cells.Item(2).Specific.ToString();
String f = cell.ToString();
Run Code Online (Sandbox Code Playgroud)
没有一个字符串(单元格和 f)给我单元格的值......
任何的想法?
@Miguel 试试这个代码
string ColId = "1"; //Set The Column Name to read
Int32 Row = 2; //Set the Row to Read
Matrix oMatrix =(Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific; //Get Access to the Matrix
EditText oEdit =(EditText)oMatrix.Columns.Item(ColId).Cells.Item(Row).Specific; //Cast the Cell of the matrix to the respective type , in this case EditText
string sValue = oEdit.Value; //Get the value form the EditText
Run Code Online (Sandbox Code Playgroud)
Miguel 另外查看SAP Business One SDK 论坛,了解有关 SAP B1 的任何问题。