Seems like it's so simple but for some reason working on it last 4 hours with no result.
I have simple Gridview with two columns and few rows already filled, now I want to add ComboBoxCell to the next row.
I'll show my logic and maybe you'll show me my error:
SampleGridView.Rows.Add("test1", "test1");
SampleGridView.Rows.Add("test2", "test2");
SampleGridView.Rows.Add("test3", "test3");
works fine for three rows now I am inserting my ComboBox:
DataGridViewRow RowSample = new DataGridViewRow();
DataGridViewComboBoxCell CellSample = new DataGridViewComboBoxCell();
CellSample.DataSource = StringList; // list of the items that I want to insert in ComboBox
RowSample.Cells.Add(CellSample);
SampleGridView.Rows.Add(RowSample);
Any ideas? Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…