Quantcast
Viewing all articles
Browse latest Browse all 2161

Re: Sales Order Form Add Unbound Checkbox to Matrix

Hello Edward,

 

What is the moment that you try adds the new column to your matrix?

 

I have tested the following condition and it works. In the ItemEvent I add the following condition:

 

            if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD && pVal.FormTypeEx.Equals("139") && pVal.BeforeAction)            {                SAPbouiCOM.Form oForm = objApp.Forms.GetFormByTypeAndCount(Convert.ToInt32(pVal.FormTypeEx), pVal.FormTypeCount);                SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;                int count = oMatrix.RowCount;                oMatrix.Clear();                oMatrix.Columns.Add("chkShpDte", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);                SAPbouiCOM.Column oColumn = oMatrix.Columns.Item("chkShpDte");                oColumn.TitleObject.Caption = "Ship Sel";                oColumn.DataBind.SetBound(false, "", "U_ShipDate");                oMatrix.AddRow(count, oMatrix.RowCount);            }

There is a trick in the code, before clear your matrix, gets the current matrix row count, and when you call add rows in the last line of code, you should add the number of rows that you obtained before clear your matrix.

 

Hope it helps.

 


Best regards,

Diego Lother


Image may be NSFW.
Clik here to view.
View Diego Lother's profile on LinkedIn


Viewing all articles
Browse latest Browse all 2161

Trending Articles