I need to populate a combobox from a dataset returned from a webservice. I set the datasource property of the control to the web method but got an empty list at run time! What am I doing wrong? Any help on how to achieve this? Looping through a datareader solved the problem but I want to consume a dataset from a web service. I thought this would be a straight stuff but I'm having problems with it.After setting the datasource property you have to bind the data to your controll.
It seems you are missing that bit.
I can handle that with DropDownList control in ASP.Net but not with ComboBox in Windows Application! Could you kindly show how syntactically?
Are you getting an error?
What does it say?
Post your code so that we can see more clearly what has gone wrong
I am not getting any error message! I only get this wierd entry in the ComboBox. "System.Data.DataViewManagerListItemTypeDescriptor"
This is the code that I used.
Private Sub Users_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim wsDemo As New ng_app001_pc_stock.PCInventory
ComboBox1.datasource = wsDemo.getAllOSTypes
End Sub
The webmethod getAllOSTypes works well, at least I tested it with DataGrid control. What could be wrong?
0 comments:
Post a Comment