3

マトリックスから読み込もうとしています。私が今まで持っているコードは次のとおりです。

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

どの文字列(セルとf)もセルの値を教えてくれません...

何か案が?

4

5 に答える 5

5

@ミゲルはこのコードを試してください

  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 B1 に関する質問については、 SAP Business One SDK Forumを確認してください。

于 2010-05-11T00:52:54.600 に答える
0
SAPbouiCOM.EditText EditValue;
string strValue;
String ColUId = "col_1"  // Column UID
Int32 Row     = 1        //Row Number
Item item     = form.Items.Item("38");
Matrix matrix = ((Matrix)(item.Specific));
EditValue     = (SAPbouiCOM.EditText)matrix.GetCellSpecific(ColUId, Row );
strValue      = EditValue.Value.ToString().Trim();
于 2012-06-19T07:39:58.230 に答える