cancel
Showing results for 
Search instead for 
Did you mean: 

Combo Selection is not working properly

Former Member
0 Kudos

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.????????

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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|; 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

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi...

u have to remove the validvalues and Add combo (Load)

For j As Integer = ocombo.ValidValues.Count - 1 To 0 Step -1

ocombo.ValidValues.Remove(j,SAPbouiCOM.BoSearchKey.psk_Index)

Next

Regards..

Billa 2007

Former Member
0 Kudos

Hi Manish,

You can't have one column in your combobox.

Look at this thread :

Regards

Michael