gpt4 book ai didi

c# - SAP B1 : Read from Matrix

转载 作者:行者123 更新时间:2023-12-04 02:23:50 24 4
gpt4 key购买 nike

我正在尝试从矩阵中读取。到目前为止,我的代码是:

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();

没有一个字符串(cell 和 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

Miguel 还检查了 SAP Business One SDK Forum有关 SAP B1 的任何问题。

关于c# - SAP B1 : Read from Matrix,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2804922/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com