C# Datagridview绑定listT+allow new后点击报错
塔克茜丝 2021-05-15 06:27:04 dgv绑定listT,不显示新行
网上说要BList.AllowNew=true;+dgv的 dataGridView1.AllowUserToAddRows=true才会显示
BindingList<HistoryInput> Blist = new BindingList<HistoryInput>(list);
Blist.AllowNew = true;
dataGridView1.DataSource = Blist;
这么设置后,确实显示新行了,但是一点击新行就报错了,点击上面几行,编辑正常
直接跳转到Application.Run(new Form1());
System.MissingMethodException:“未找到类型“ComboBoxDraw.Form1+HistoryInput”上的构造函数。”
直接懵逼了,这什么情况?错误的没方向了。