Hi.
I have a bounded datagridview and it's work fine.
I want to know if I can to add a combobox column to datagridview.
Thanks for all.
Sure you can. Simply create new DGVcomboBox column and add or insert it to dgv columns.
DataGridViewComboBoxColumn cmbcolumn = new DataGridViewComboBoxColumn();
{
cmbcolumn.Name = "cmbColumn";
cmbcolumn.HeaderText = "combobox column";
cmbcolumn.Items.AddRange(new string[] { "aa", "ac", "aacc" }); //items in comboBox
}
dataGridView1.Columns.Insert(1, cmbcolumn); //inserting comboBox into 2nd columns (colimn at index 1)
Hi.
I have a bounded datagridview and it's work fine.
I want to know if I can to add a combobox column to datagridview.Thanks for all.
Try links:
http://weblogs.asp.net/manishdalal/archive/2008/09/28/combobox-in-datagrid.aspx
http://stackoverflow.com/questions/3684154/how-to-add-a-combobox-to-an-asp-net-unbound-gridview
Hope it Helps...!!!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.