Showing results for 
Search instead for 
Did you mean: 

Populate Combo in matrix

Former Member
0 Kudos


I have a Matrix.

In Each row i want like to populate matrix with values based on the row.

My problem is once a combo gets populated in one row, the same value

gets populated for other rows also(inspite of changing values)

This is my code

Do Until rsWHID.EoF = True

i = i + 1

Dim sLength As String

sLength = rsWHID.Fields.Item("Length").Value

WHOH_Form.DataSources.UserDataSources.Item("usLot").ValueEx = ""

Dim sDate As String = Convert.ToString(rsWHID.Fields.Item("DueDate").Value)

WHOH_Form.DataSources.UserDataSources.Item("usDate").ValueEx = Convert.ToString(sDate).Replace(".", "")


sQuerySOWO = "select u_ORDER,U_SOWO from [@CDIplanorders] WHERE u_iTEMcODE='" & sItemNo & "' AND u_lENGTH='" & sLength & "'"


WHOH_Form.DataSources.UserDataSources.Item("usCmboSOWO").ValueEx = ""

WHOH_Combo = WHOH_Matrix.Columns.Item("cmbSOWO").Cells.Item(i).Specific

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

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

Next j

If Not rsSOWO.EoF() Then

Do Until rsSOWO.EoF = True

Dim strOrderNO, strWOorSO As String

strOrderNO = rsSOWO.Fields.Item("u_ORDER").Value

strWOorSO = rsSOWO.Fields.Item("u_SOWO").Value

WHOH_Combo.ValidValues.Add(strOrderNO, strWOorSO)



End If



Pls help.

Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

The design of the matrix implies that all row-comboboxes have the same data, you cannot change that.

Maybe use the double click event to popup a form and show the different possible values depending on the row