views:

59

answers:

0

i have dynamically added combobox to datagridview. in this gridview i need to enter the values to this combobox cell to insert that values to database.but it is not allowing me to enter the value. i have set checkcmbColumn.ReadOnly = false;

code:

if (strtype.Contains("ComboBox"))    
{

            DataGridViewComboBoxColumn checkcmbColumn = new DataGridViewComboBoxColumn();
        checkcmbColumn.Name = strControlName;
        checkcmbColumn.HeaderText = strColumnName;                               
        checkcmbColumn.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
        checkcmbColumn.Width = 100;
        checkcmbColumn.ReadOnly = false;

        GrdViewDetails.Columns.Add(checkcmbColumn);
}