private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { else if (colIndex == 6) { DataTable comboSource = new DataTable("comboSource"); comboSource.Columns.AddRange(new DataColumn[] { new DataColumn("id"), new DataColumn("stat") }); comboSource.Rows.Add(1, ""); comboSource.Rows.Add(2, "Left"); comboSource.Rows.Add(3, "Expire"); DataGridViewComboBoxColumn col = new DataGridViewComboBoxColumn(); col.DataPropertyName = "stat"; col.DataSource = comboSource; col.DisplayMember = "stat"; col.ValueMember = "id"; dataGridView1.Columns.Add(col); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)