cancel
Showing results for 
Search instead for 
Did you mean: 

Combo box Selected value clearing

Former Member
0 Kudos

Hi,

I am using 2 combo box in my application.

2nd combox value depends on 1st combo box.

when i change 1st combo box it's change 2nd combo box content, but it was hold previous 2nd combox selected value.

i want clear 2nd combox selected value on change of 1st com box.

my code :

oActcombo = oFormRA.Items.Item("12").Specific

Dim oSActccombo As SAPbouiCOM.ComboBox

oSActccombo = oFormRA.Items.Item("13").Specific

If Not oActcombo.Selected.Value Is Nothing Then

For j = oSActccombo.ValidValues.Count - 1 To 0 Step -1

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

Next

End If

For j = oSActccombo.ValidValues.Count - 1 To 0 Step -1

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

Next

oSActccombo.Select(Nothing)

regards,

Avijit

Accepted Solutions (0)

Answers (1)

Answers (1)

Nussi
Active Contributor
0 Kudos

Hi,

i wrote a comboboxclearing procedure in c#

its also setting the "blank" value than.

the trick is to add a blank dummy value, select it and delete it again.

[look here|;

regards

David