Skip to Content
0
Jun 19, 2020 at 04:21 PM

DBDataSource - the value in the column is not loaded

35 Views Last edit Jun 19, 2020 at 04:29 PM 2 rev

Hello all,

I'm adding UDF to the matrix in the "list of production orders" form. Everything seems OK. There is no error in the code below, but the value is not visible when I open the screen. I'm sure that I have values in the database.

if (pVal.FormTypeEx == "10201" && pVal.BeforeAction == true && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DRAW) {

try {

SAPbouiCOM.DBDataSource prodOrders;

SAPbouiCOM.Form listOfProductionOrdersForm = Application.SBO_Application.Forms.Item(pVal.FormUID);

prodOrders = listOfProductionOrdersForm.DataSources.DBDataSources.Item("OWOR");

SAPbouiCOM.Matrix oMatrixProductionOrders = (SAPbouiCOM.Matrix)listOfProductionOrdersForm.Items.Item("7").Specific; SAPbouiCOM.Columns oMatrixProductionOrdersColumns = oMatrixProductionOrders.Columns; oMatrixProductionOrders.Clear();

SAPbouiCOM.Column oMatrixProductionOrdersColumn = oMatrixProductionOrdersColumns.Add("Project", SAPbouiCOM.BoFormItemTypes.it_EDIT);

oMatrixProductionOrdersColumn.TitleObject.Caption = "Project";

oMatrixProductionOrdersColumn.Width = 100;

oMatrixProductionOrdersColumn.Editable = false; oMatrixProductionOrdersColumn.DataBind.SetBound(true, "OWOR", "U_Project2");

}

catch(Exception ex) { } }