how to get the value entered in combobox that is binded to datagridview
Posted
by Ranjana
on Stack Overflow
See other posts from Stack Overflow
or by Ranjana
Published on 2010-06-18T05:45:55Z
Indexed on
2010/06/18
5:53 UTC
Read the original article
Hit count: 165
i have dynamically added combobox to datagridview. in this gridview i need to enter the values to combobox. but it is not allowing me to enter the value.
code:
if (strtype.Contains("ComboBox"))
{
checkcmbColumn.Name = strControlName;
checkcmbColumn.HeaderText = strColumnName;
checkcmbColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
checkcmbColumn.Width = 100;
checkcmbColumn.ReadOnly = false;
checkcmbColumn.Items.Add("1");
checkcmbColumn.Items.Add("2");
GrdViewDetails.Columns.Add(checkcmbColumn);
}
© Stack Overflow or respective owner