on 05-05-2009 9:18 AM
i have used a combobox in a form. i want to select item code and item name from oitm. i have lot of item like 5000.
when i select those item from will show taking 2 minuties. but i am not selecting those item no problem at all...
please suggest me......or advice me....
oItem = oForm.Items.Add("ItemVal", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oItem.Left = 112
oItem.Width = 120
oItem.Top = 85
'oItem.LinkTo = "CustTxt"
oItem.Enabled = True
oItem.AffectsFormMode = True
cmbItemCode = oItem.Specific
AddItemsToCombo(cmbItemCode)
cmbItemCode.DataBind.SetBound(True, "@VTPR", "U_Itemno")
Private Sub AddItemsToCombo(ByVal ocombo As SAPbouiCOM.ComboBox)
ocombo.ValidValues.Add("", "")
Dim rs As SAPbobsCOM.Recordset
Dim i As Integer
rs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
rs.DoQuery(" SELECT Itemcode ,ItemName FROM OITM ")
rs.MoveFirst()
While rs.EoF = False
Dim sName As String = rs.Fields.Item("ItemName").Value.ToString()
If sName.Length > 50 Then sName = sName.Substring(0, 50)
ocombo.ValidValues.Add(rs.Fields.Item("ItemCode").Value, sName)
rs.MoveNext()
End While
End Sub
please help ....... how could i solve this issue.
,
Hi,
What exactly is the issue ??
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
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.