Skip to Content
0
Former Member
Mar 12, 2010 at 06:04 AM

How to add a column in Item Master form with chooselist

17 Views

Hi Experts

I add a column in Item Master Form in Stock Data Tab. In this column I want to add Choose list. For this I use AfterFormLoad event. It gives Error "Matrix Line Exist" . My code is given below

If pVal.FormType = "150" Then
                form = B1Connections.theAppl.Forms.GetForm(150, pVal.FormTypeCount)
                form.PaneLevel = 3
                oItem = form.Items.Item("28")
                oMatrix = oItem.Specific
                Dim chooseObj As ChooseListClass
                chooseObj = New ChooseListClass
                chooseObj.AddChooseFromListBinCode(form.UniqueID)
                oColumns = oMatrix.Columns
                oColumn = oColumns.Add("BINCODE", BoFormItemTypes.it_EDIT)
                oColumn.Width = 100
                oColumn.DataBind.SetBound(True, "OITW", "U_BINCODE")
                oColumn.TitleObject.Caption = "Def BinCode"

                oColumn.Editable = True
                oColumn.ChooseFromListUID = "CFL5"
                oColumn.ChooseFromListAlias = "U_BinCode"

                oColumn = oColumns.Item("U_BINCODE")
                oColumn.Visible = False
            End If

please give your suggestion

Regards

Jitender