ComboboxColumn取值——Winform中DataGridView中某一列使用下拉框

    ComboboxColumn的用法网上很多,绑定数据源都很简单,这里我遇到的是、不绑定数据源,即所有comobox的绑定都是固定的几个数据:

                           

可以看到没有绑定任何数据源,

     

 ,在后台cs中取到下拉框的值,通过linq将所有的下拉框的值存入了List<string>中:

1 List<string> list = new List<string>();
2 list.AddRange(from DataGridViewRow row in DataGridView1.Rows select row.Cells["Comobox1"].EditedFormattedValue.ToString());

可以看到使用的是EditedFormattedValue属性,该属性能够取得comobox中所显示的值,不管其是否已经提交。