求助:winform 中 Datagridview 中的下拉控件绑定默认值
Datagridview中的下拉菜单已经绑定了数据库中的值,下拉可以选择出来
但是需要匹配一个默认值
//绑定选中的值
for (int i = 0; i < gvInterfaceList.Rows.Count; i++)
{
string strIO = string.Empty;
if (gvInterfaceList.Rows[i].Cells["IO"].Value.ToString() == "False")
{
strIO = "输入";
}
else
{
strIO = "输出";
}
((DataGridViewComboBoxCell)gvInterfaceList.Rows[i].Cells["IOselect"]).Style.NullValue = strIO;
((DataGridViewComboBoxCell)gvInterfaceList.Rows[i].Cells["InterfaceType"]).Style.NullValue = "数字";
}
这样怎么搞都出不来,大家有没有好办法