C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






View Message



Sender Anuraj

Recipient(s) Spha

Date 01 Oct 2009


Re: Re: Re: Re: How to bind the dropdown inside the gridview o

The Datasource is the Collection of Data that you want to display in the Dropdown. It should be implement IEnumerable. Like,List<>, Arraylist, DataTable etc.

Suppose you have a Country object, with CountryName and CountryId properties.
List Countries = new List();
Countries.Add(new Country(){CountryName = "India",CountryId = 1});

Dropdown1.DataSource = Countries;
Dropdown1.DataTextField = "CountryName";
Dropdown1.DataValueField = "CountryId";
Dropdown1.DataBind();



>>> On 01 Oct 2009, Spha wrote:

wat must I put there as a Datasource? an how






dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use