on 06-01-2005 10:14 AM
Dear all
I have problem to get value selected in combo box when i add it in matrix.
I add with:
col = omatrix.Columns.Item(ID_COL_MAT)
col.ValidValues.Add(rs.Fields.Item(ID).Value(), rs.Fields.Item(VALUE).Value())
Can you help me?
Thank you
Hi Antonio,
Here some code lines that are incluided inside the ItemEvent when the user selects the combo box.
If (pVal.ItemUID = "mat") And (pVal.ColUID = "ItemCode") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) Then
Dim oEdit As SAPbouiCOM.EditText
Dim oCombo As SAPbouiCOM.ComboBox
oCombo = colItemCode.Cells.Item(pVal.Row).Specific
oEdit = colItemName.Cells.Item(pVal.Row).Specific
oEdit.Value = oCombo.Selected.Description
End If
Hope this helps,
Felipe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Donna,
What Felipe is doing is taking the value of the column colItemCode type ComboBox and copying it to the column colItemName that is of type EditText.
So, it is normal the two lines you are pointing use a different column name.
He is reading from the ComboBox by using
oCombo.Selected.Description
and writing its value into the EditText value
oEdit.Value
Hope it helps
Trinidad.
SAPbouiCOM.EditText oEdit;
SAPbouiCOM.ComboBox oCombo;
oCombo = (SAPbouiCOM.ComboBox)colItemCode.get_Cells().Item(new Integer(pVal.get_Row())).get_Specific();
oEdit = (SAPbouiCOM.EditText)colItemName.get_Cells().Item(new Integer(pVal.get_Row())).get_Specific();
oEdit.set_Value(oCombo.get_Selected().get_Description());
I got the following error message on the row "Item(new Integer...":
Row - Invalid index [66000-31]
Using debug I saw the value of pVal.getRow() is equal to 1 (int type), i'm on the first row of the matrix.
Can you help me to solve it ?
How can I get the value of combo box selected?
Thanks in advance
Best regards
Andrea
sorry
there is error : the last message is for another forum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
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.