I have a datagridview, in this datagirdview, i added two unbound columns, one is a combobox and second is a textbox type column, besides this , I have a datatable of some rows.
I am setting gird datasource with my datatable, then I am trying to add values to combobox control, it should display three values (Truck, Plane, Ship)
when grid loads it displays stores, but no value in combobox, I tried various methods like creating a combobox data column and adding values to it by binding a datatable, I also tried by adding in column.items both in designer and by code but combobox never gets the values.
as an experiment I am also trying to add a new column by below code, but second column also show no values.
DataGridViewComboBoxColumn dgvcbc = new DataGridViewComboBoxColumn();
DataTable dt = new DataTable();
dt.Columns.Add("Media", typeof(string));
dt.Rows.Add("Truck");
dt.Rows.Add("Car");
dgvcbc.DataSource = dt;
dgvcbc.DisplayMember = "Media";
dgvcbc.ValueMember = "Media";
this.grdDestShops.Columns.Add(dgvcbc);