4
Reply

Adding Items to Drop Down List from Dataset

Matt Ryles

Matt Ryles

Feb 14 2009 7:01 AM
8.8k
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)