Combo Selection is not working properly
Hi All,
I am using one combo box which has values
1. a
2. b
3 c
I trap the combo_select event to trace the selected value of combo box. When I select first value from combobox. cbBox.Selected is null. when I select 2nd value then cbBox.Selected is 2st value. and again if I select first value then it comes first value in cbBox.selected.
Why it is happening.....
I would like to insert only one column value in combo box which we don't have. Any help on this.
cbBox.ValidValues.Add(string , string).....
this will create two columns in combo box. I want only one. How can I do this.????????
Former Member replied
Hi.
Try 03.SimpleForm in SDK_Samples_2005 (...COM UIVB.NET 3.SimpleForm).
... oForm.DataSources.UserDataSources.Add("CombSource", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20) '//************************* '// Adding a Combo Box item '//************************* oItem = oForm.Items.Add("ComboBox1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX) oItem.Left = 157 oItem.Width = 163 oItem.Top = 24 oItem.Height = 14 ' To see in combo Description set to True and for Code set to False oItem.DisplayDesc = True 'oItem.DisplayDesc = False oComboBox = oItem.Specific '// bind the Combo Box item to the defined used data source oComboBox.DataBind.SetBound(True, "", "CombSource") '// Add values to combobox oComboBox.ValidValues.Add("1", "Combo Value 1") oComboBox.ValidValues.Add("2", "Combo Value 2") oComboBox.ValidValues.Add("3", "Combo Value 3") '// And so we add new values ... oComboBox.ValidValues.Add("4", "My New Value") ...
Note: In SAP forms exists combo box with only display values.
Look this [thread|How to display only the description of a combobox.; to find solution.
Search SAP SDK Help for LoadSeries and see Add Items for the Manage Series Service.
BR
Sierdna S.
Edited by: Sierdna S on Sep 18, 2008 5:37 PM