B
Bill Nguyen
Several comboboxes in my app are not working properly with VS2005. I ahve
both .NET 1.1 and 2.0 installed in my development PC.
Below is an example of the code. It never worked the first time when
..SelectValue is set to a certain value. 2nd or 3rd try will do! Some other
combobox worked flawlessly!
Is it a known bug that I'm not aware of?
Any suggestion is greatly appreciated.
Bill
-------------------------
Private Function AddProductClass()
Dim mSQL As String
Dim dS As DataSet
mSQL = "SELECT * from WF_ProductClass "
mSQL += " ORDER by ProductClassID "
dS = Master.MasterData.sqlSelectDataset(mSQL, "wfifuel")
cbProductClass.ValueMember = "ProductClassID"
cbProductClass.DisplayMember = "ProductClassName"
cbProductClass.DataSource = dS.Tables(0)
End Function
-- displaying---
If IsDBNull(drV.Item("productClassID")) = False Then
MsgBox(drV.Item("productClassID"))
cbProductClass.SelectedValue = drV.Item("productClassID")
Else
cbProductClass.Text = "Invalid"
End If
both .NET 1.1 and 2.0 installed in my development PC.
Below is an example of the code. It never worked the first time when
..SelectValue is set to a certain value. 2nd or 3rd try will do! Some other
combobox worked flawlessly!
Is it a known bug that I'm not aware of?
Any suggestion is greatly appreciated.
Bill
-------------------------
Private Function AddProductClass()
Dim mSQL As String
Dim dS As DataSet
mSQL = "SELECT * from WF_ProductClass "
mSQL += " ORDER by ProductClassID "
dS = Master.MasterData.sqlSelectDataset(mSQL, "wfifuel")
cbProductClass.ValueMember = "ProductClassID"
cbProductClass.DisplayMember = "ProductClassName"
cbProductClass.DataSource = dS.Tables(0)
End Function
-- displaying---
If IsDBNull(drV.Item("productClassID")) = False Then
MsgBox(drV.Item("productClassID"))
cbProductClass.SelectedValue = drV.Item("productClassID")
Else
cbProductClass.Text = "Invalid"
End If