EDN Admin
Well-known member
code:
private static BindingList<modelClass.element> elementsTree=new BindingList<modelClass.element>();<br/>
private static BindingList<modelClass.section> sectionsTree=new BindingList<modelClass.section>();
Program.ElementsTree.AllowEdit = true;<br/>
Program.ElementsTree.AllowNew = true;<br/>
Program.ElementsTree.AllowRemove = true;<br/>
//ElementsBinding.<br/>
dataGridView1.ReadOnly = false;<br/>
dataGridView1.DataSource = Program.ElementsTree;<br/>
dataGridView2.DataSource = Program.SectonsTree;
//when do this,the dataGridView displays data well, I can del & add a row, but I can not revise the data in the cell; Detail is:I input a new data in a cell, but the data change to the original data when I move the cursor to another cell, the cell
can not commit the new value, whats the problem?
//可以增删行,但是在我更改了一个单元格中的数据后,当把光标移动到其他单元格,数据又改回了原来的样子,新数据在单元格中不能提交,因此无法编辑单元格?请问是哪里出了问题?多多帮忙
View the full article
private static BindingList<modelClass.element> elementsTree=new BindingList<modelClass.element>();<br/>
private static BindingList<modelClass.section> sectionsTree=new BindingList<modelClass.section>();
Program.ElementsTree.AllowEdit = true;<br/>
Program.ElementsTree.AllowNew = true;<br/>
Program.ElementsTree.AllowRemove = true;<br/>
//ElementsBinding.<br/>
dataGridView1.ReadOnly = false;<br/>
dataGridView1.DataSource = Program.ElementsTree;<br/>
dataGridView2.DataSource = Program.SectonsTree;
//when do this,the dataGridView displays data well, I can del & add a row, but I can not revise the data in the cell; Detail is:I input a new data in a cell, but the data change to the original data when I move the cursor to another cell, the cell
can not commit the new value, whats the problem?
//可以增删行,但是在我更改了一个单元格中的数据后,当把光标移动到其他单元格,数据又改回了原来的样子,新数据在单元格中不能提交,因此无法编辑单元格?请问是哪里出了问题?多多帮忙
View the full article