DataGridViewComboBoxColumn not showing the contents
-
Hi I am trying to insert a DataGridViewComboBoxColumn, the column is getting inserted but the values in the combo box are shown. The Code is as under
DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn(); column.HeaderText = "SELECT"; column.Name = "ItemSelect"; column.CellTemplate = new DataGridViewComboBoxCell(); //column.DataSource = new string[] { "One", "Two", "Three" }; column.Items.AddRange(new string[] { "One", "One", "Three" }); column.DropDownWidth = 160; column.Width = 90; column.MaxDropDownItems = 3; column.FlatStyle = FlatStyle.Flat; myDataViewGrid.Columns.Insert(0, column);
When I run the code, the dataviewgrid all cells except 1st are populated properly, but in first cell I see only empty combobox Please guide Thanks in advance