My data gridview is not bound to a datasource and it has a combo box name Test2. I am inserting string in it run time.Following is my code
DataGridViewComboBoxColumn comboBox = (DataGridViewComboBoxColumn)dataGridView1.Columns["Test2"];
string[] arr1 = new string[] { "a", "b", "c" };
comboBox.Items.AddRange(arr1);
But rather array of strings i am interested in using List<string>.For that code i wrote is this
DataGridViewComboBoxColumn comboBox = (DataGridViewComboBoxColumn)dataGridView1.Columns["Test2"];
List<string> data = new List<string>();
data.Add("a");
data.Add("b");
data.Add("c");
comboBox.Items.AddRange(data);
But now datagridview combo box is showing (Collection) string only. Any idea how can i make List<string> working.Workaround is this I can do is change List<string> to array of strings but it will be inefficient.
Not sure but can you do something like this