Dataset from WebService

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I use a WebService that returns a dataset using a method called GetAllPlayers(). In my C# WinApp I want to populate a combobox with the data from the dataset but I can´t get the code right

Any idea´s?

Thanks!!
 
Andreas,

Are you having problems getting the dataset, or are you having problems
performing the binding?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Andreas Eriksson said:
Hi,

I use a WebService that returns a dataset using a method called
GetAllPlayers(). In my C# WinApp I want to populate a combobox with the data
from the dataset but I can´t get the code right.
 
Andreas,

How are you performing the binding? Can you show the code, and possibly
the structure of the returned data set?

i
 
Andreas,

In this case, you have bound the data source, but you need to tell it
where in the data source to get the values. You want to set the
DisplayMember property to the name of the table in the data set as well as
the field to display. If the table is "Table1", then you want to set the
DisplayMember property to "Table1.sPlayerName".

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Andreas Eriksson said:
My dataset from the webservice contains the fields iPlayerID and sPlayerName.

In my WinApp I start with:
dataset containing the two fields above. I want to present the sPlayerName
in a combobox.
 
Back
Top