cancel
Showing results for 
Search instead for 
Did you mean: 

Combo Box Validation

Former Member
0 Kudos

Dear Experts,

I have one matrix with two Combo Box Columns. Based on First Combo box value, the Second Combo-box column should load diff Values in the Particular ROW. Means Each row i want to fill Diff values in Combo Box Columns.

I have done that. But its loading in all rows. Kindly suggest me...

Thanks in Advance

Tomy,

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member689126
Active Contributor
0 Kudos

Hi

Try to fill your combo box in before click event of that combobox

Hope This helps

Regards

Arun

former_member682029
Contributor
0 Kudos

Please paste the source code which you are using..

Thanks

Former Member
0 Kudos

Hi Anoop,

Thanks for ur reply. This is my code

OCombo = objmatrix.Columns.Item("2").Cells.Item(Row).Specific

If OCombo.ValidValues.Count > 1 Then

For i As Integer = OCombo.ValidValues.Count - 1 To 0 Step -1

OCombo.ValidValues.Remove(i, SAPbouiCOM.BoSearchKey.psk_Index)

Next

End If

Dim str As String

str = "select * from [@JOBCARD] Where Code = '" & objmatrix.Columns.Item("1").Cells.Item(Row).Specific.Selected.value & "'"

ORec.DoQuery(str)

While ORec.EoF = False

OCombo.ValidValues.Add(ORec.Fields.Item("U_CARDNO").Value, ORec.Fields.Item("U_CARDVAL").Value)

ORec.MoveNext()

End While

Regards

Tomy.

Former Member
0 Kudos

Hai,

Once combo box values are added it will displayed in all rows. We may do some work around to remove it.

ie., when row is added, along with omatrix. addrow(-1) we can remove the valid values of combo box of current row.

Combo = objmatrix.Columns.Item("2").Cells.Item(omatrix.rowcount).Specific //Combo box in Lastly added row

If OCombo.ValidValues.Count > 1 Then

For i As Integer = OCombo.ValidValues.Count - 1 To 0 Step -1

OCombo.ValidValues.Remove(i, SAPbouiCOM.BoSearchKey.psk_Index)

Next

End If

hope this helps you.

Thanks & Regards,

Parvatha Solai.N