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
Loading
Satish MahapatraPosted Feb 16, 2009, 12:49 AM
sam calebPosted Feb 16, 2009, 11:30 PM
Matt RylesPosted Feb 16, 2009, 10:07 AM
cboCast.DataSource = nDS.Tables["TableName"];
LisaPosted Feb 16, 2009, 9:09 AM
You can always retrieve the lists from a data table quite easily
here either u can build a schema for the dataset or just go through it and collect the values from a datatable of that dataset which actually holds your data.
and also dont forget configuring display and value members of the drop down list
Hope IT Helps
Thanks,
Lisa