Skip to Content
0
Nov 22, 2011 at 07:13 AM

DataTable Concept

25 Views

Dear All,

I have a problem regarding a data-table. Generally when we write code for CFL for Item Code we write following code..

if (pVal.ItemUID == enControlName.mtxDetails & pVal.ColUID == enControlName.colItemCode & strUid == enCFL.cflItem)

{

SAPbouiCOM.Matrix oMatrix = default(SAPbouiCOM.Matrix);

oMatrix = (SAPbouiCOM.Matrix)this.m_SBO_Form.Items.Item(enControlName.mtxDetails).Specific;

SAPbouiCOM.EventFilters oldFilter = this.SBO_Application.GetFilter();

this.SBO_Application.SetFilter(new SAPbouiCOM.EventFilters());

this.m_SBO_Form.Freeze(true);

int Row = pVal.Row;

for (int i = 0; i <= oDataTable.Rows.Count - 1; i++)

{

try

{

oEdit = (SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colItemCode).Cells.Item(Row).Specific;

oEdit.Value = Convert.ToString(oDataTable.GetValue(0, i));

}

catch (Exception ex)

{

}

oEdit = (SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colItemName).Cells.Item(Row).Specific;

oEdit.Value = Convert.ToString(oDataTable.GetValue(1, i));

((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colQtyApp).Cells.Item(Row).Specific).Value = "1";

((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colInstock).Cells.Item(Row).Specific).Value = oDataTable.GetValue(11, i).ToString();

((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colCommited).Cells.Item(Row).Specific).Value = oDataTable.GetValue(12, i).ToString();

((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colOrder).Cells.Item(Row).Specific).Value = oDataTable.GetValue(13, i).ToString();

((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colUOM).Cells.Item(Row).Specific).Value = oDataTable.GetValue(20, i).ToString();

((SAPbouiCOM.EditText)oMatrix.Columns.Item(enControlName.colRemarks).Cells.Item(Row).Specific).Value = oDataTable.GetValue(46, i).ToString();

I want to ask here that what 11,12,13, 20 & 46 describe in highlighted areas respectively ? On which bases we write these object columns...?

Plz. give ur precious replies......