views:

32

answers:

2
MenuItem menus = new MenuItem();
GridView1.DataSource = menus.GetDataTable();
GridView1.DataBind();

menus.GetDataTable() returns a DataTable. In the above case, we are returning to GridView. I need to populate the data into a combo box. How can i do it?

NOTE: Assume GetDataTable only returns records of a single column.

I'm using Winforms

A: 

Check if this helps you.

Ram
Since you are the only, i will pick you as the best answer.
peace
A: 

Solution is:

    Country countryName = new Country();
    comCountryCus.DataSource = countryName.GetDataFromTable();
    comCountryCus.DisplayMember = "CountryName";

http://msdn.microsoft.com/en-us/library/w67sdsex%28v=VS.80%29.aspx

K.I.S.S - Keep It Simple & Stupid.

peace