4
Answers

Adding Items to Drop Down List from Dataset

Matt Ryles

Matt Ryles

15y
8.8k
1
Hi,

Im trying to get items from my dataset to display as text and values fro my drop down box, the dataset is coming from a Web Service to the application.
The dataset is OK but im struggling to get the information from the dataset to the Drop Down Box, here's what I have:
           ****************************************
            TimsburgWS.ServiceSoapClient nService = new TimsburgWS.ServiceSoapClient();
            DataSet nDS = new DataSet();
            nService = new TimsburgApplication.TimsburgWS.ServiceSoapClient();
            nDS = nService.listNames();


            cboCast.DataSource = nDS.Tables;
            cboCast.DisplayMember = "PeopleName";
            cboCast.ValueMember = "PeopleID";
***********************************************

Any help would be appriciated, thanks.

Matt
Answers (4)