on 02-11-2008 10:51 AM
Hi,
When I'm trying to select the empty validvalue with a combo in SBO 2007 A, I've the error "Out of Range"
myCombo.Select( 0, BoSearchKey.psk_Index);
However I'm sure that the item 0 of my ValidValues is blank.
I tried to do the same thing by value or description and it's the same problem.
Can anyone help me ?
Thanks
(I'm using 2005 version of SAPboui/bobsCom.dll)
Try the 0 give between quotes myCombo.Select( "0", BoSearchKey.psk_Index)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julien,
did you add the Validvalue 0 by yourselft ?
or do you mean the blank standard value when you have no item selected ?
because when you mean the "not selected blank" value you must
1. delete all values
2. add a pseude empty value with description ""
3. select this pseudo value
4. add all values from point 1. again and remove the pseudo value
regards
Hi,
Yes I've added this blank value ("",""), at position 0 by myself at the creation of the form.
My combobox (actually it's a cell of a matrix) is not binded to a multivalue field in database
It's quite crazy because, i can access all the validvalues and select all these values except the first one ("").
Hi Julien,
i tried it as
oComboBox.ValidValues.Add("1", "Combo Value 1")
oComboBox.ValidValues.Add("", "") - as you wrote
oComboBox.ValidValues.Add("2", "Combo Value 2")
oComboBox.ValidValues.Add("3", "Combo Value 3")
oComboBox.Select("", SAPbouiCOM.BoSearchKey.psk_ByValue)
oComboBox.Select(1, SAPbouiCOM.BoSearchKey.psk_Index)
and both select method work. Are you sure that you have added this blank value?
Try to debug it as
Dim q As Integer
Dim s As String
For q = 0 To oComboBox.ValidValues.Count - 1
s = oComboBox.ValidValues.Item(q).Value
Next
maybe it helps you.
Petr
Thanks for your answers,
I found a solution.
The problem is I've added a value with a blank space " " and not a blank value "" at the first position.
Now with a blank value the Select method works:
myCombo( 0, ByIndex ).
Visibly, SBO 2007 doesn't like the selection of a blank space in a ComboBox.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
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.