int Columnindex = GetColumnIndex(columnName + "New"); DataGridViewComboBoxCell ComboBoxCell2 = new DataGridViewComboBoxCell(); ComboBoxCell2.DataSource = null; ComboBoxCell2.DataSource = filteredOptions; ComboBoxCell2.DisplayMember = ComboboxColumn.DisplayMember; ComboBoxCell2.ValueMember = ComboboxColumn.ValueMember; ComboBoxCell2.FlatStyle = FlatStyle.Flat; ComboBoxCell2.DropDownWidth = 250;//shreyasimportant this.gdbgGrid[Columnindex, gdbgGrid.CurrentCell.RowIndex] = ComboBoxCell2; ComboBoxCell2.DisplayStyle = DataGridViewComboBoxDisplayStyle.DropDownButton; System.Diagnostics.Debug.WriteLine("UTConfig - Step - setComboBoxBasicFilteredType() ComboboxCellValue" + ComboBoxCell2.DisplayMember.ToString() + " value is- :: " + ComboBoxCell2.Value.ToString() + "" + gdbgGrid.Name); if (m_ComboDirtyStateChanged) { if (columnName != "Revision") { ComboBoxCell2.Value = Convert.ToString(filteredOptions[0][ComboboxColumn.DisplayMember]); //Commenting this line of code eliminates stack overflow exception & value is hidden in the combobox cell. Clicking the combobox cell the value appears.Need an alternative way to display the value. } } System.Diagnostics.Debug.WriteLine("UTConfig - Step8 - setComboBoxBasicFiltered() - column exists- end :: " + gdbgGrid.Name);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)