How to Bind ComboBox using DataTable?

Muhilan
Posted by Muhilan under VB.NET category on | Views : 7622
Dim countryNameColumn As DataColumn = dataTable.Columns.Add("data", GetType(String))
dataTable.Rows.Add("One")
dataTable.Rows.Add("Two")
dataTable.Rows.Add("Three")
dataTable.Rows.Add("Four")
dataTable.Rows.Add("Five")


ComboBox1.DataSource = dataTable
ComboBox1.DisplayMember = "data"

Comments or Responses

Login to post response