79775582

Date: 2025-09-26 07:38:04
Score: 1
Natty:
Report link

Original poster of the question here.
The reason why the ComboBox wasn't showing any items was because I seem to have missed the DataGridView's ReadOnly and left it on True.
After changing it to False, the ComboBox worked perfectly.
enter image description here

Here's the code:

DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn();

column.Items.Add("実案件");
column.Items.Add("参考見積り");

column.DataPropertyName = dataGridView_検索.Columns["見積もり日区分"].DataPropertyName;
dataGridView_検索.Columns.Insert(dataGridView_検索.Columns["見積もり日区分"].Index, column);
dataGridView_検索.Columns.Remove("見積もり日区分");
column.Name = "見積もり日区分";     
column.HeaderText = "見積もり日区分";
column.FlatStyle = FlatStyle.Flat;
column.DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox;
column.DefaultCellStyle.BackColor = Color.FromArgb(255, 255, 192);
column.MinimumWidth = 150;
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Anpo Desu