How to populate datas in a Datagridview comboboxcolumn?
-
hi can any body help me how to populate a DGV combobox column with datas from a datatable.
// create a combobox column DataGridViewComboBoxColumn comboboxColumn; comboboxColumn = _createComboBoxColumn(); comboboxColumn.HeaderText = "Item"; dataGridView1.Columns.Insert(0, comboboxColumn); //Tried to populate data as below , but not successfull BindingSource s = new BindingSource(); s=dtItem.Columns["Item"].ToString(); comboboxColumn.DataSource = s;
thank you in advance ssksenthil
-
hi can any body help me how to populate a DGV combobox column with datas from a datatable.
// create a combobox column DataGridViewComboBoxColumn comboboxColumn; comboboxColumn = _createComboBoxColumn(); comboboxColumn.HeaderText = "Item"; dataGridView1.Columns.Insert(0, comboboxColumn); //Tried to populate data as below , but not successfull BindingSource s = new BindingSource(); s=dtItem.Columns["Item"].ToString(); comboboxColumn.DataSource = s;
thank you in advance ssksenthil
you should try it by creating a DataTable Object which can be databound().