on 12-01-2009 10:37 AM
hi..
i have created a form where i have a combobox...i have some values for combobox called (open, closed, sold) when form loads for the first time and when it is in Add mode then the default value should be OPEN in combo box..
i tried this code...this code is working fine when form is in find mode...when when the form mode is changed to add mode...there is no value selected in combo box...what should i do to have default value as OPEN in my combo box in ADD mode????
oForm.DataSources.UserDataSources.Add("ComboSrc5", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1)
oitem = oForm.Items.Item("21") ''for accessing the combo box item
oCombo = oitem.Specific
'' to bind the combo box item to defined user data source
oCombo.DataBind.SetBound(True, "", "ComboSrc5")
''giving some static values to combobox
oCombo.ValidValues.Add("OPEN", "1")
oCombo.ValidValues.Add("CLOSED", "2")
oCombo.ValidValues.Add("SOLD", "3")
oCombo.Select("OPEN", SAPbouiCOM.BoSearchKey.psk_ByDescription)
oForm.Items.Item("21").Specific.DataBInd.SetBound(True, "@FA_MASTERDATA", "U_Asset_Status")
Hi
I think you code is not good
Try
oCombo.Select("OPEN", SAPbouiCOM.BoSearchKey.psk_ByValue)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.