📚 SAP Business One SDK Help

DataBind Object
See Also  Members  Example

Description

Represents data that is bounded to a form item.

Example

Binding an item to a data source (Visual Basic)Copy Code
Public Sub BindItemToDataSource()

    Dim oForm As SAPbouiCOM.Form
    Dim oEditText As SAPbouiCOM.EditText

    '// add a new form
    Set oForm = SBO_Application.Forms.Add("SimpleForm")

    '// add a User Data Source to the form
    oForm.DataSources.UserDataSources.Add "EditSource", dt_SHORT_TEXT, 20

    '//*************************
    '// Adding a Text Edit item
    '//*************************

    Set oEditText = oForm.Items.Add("EditText1", it_EDIT).Specific

    '// bind the text edit item to the defined used data source
    oEditText.DataBind.SetBound True, "", "EditSource"

End Sub

See Also