Home > Net >  For use in the WPF datagrid display information in the database, and realizes the project instance.
For use in the WPF datagrid display information in the database, and realizes the project instance.

Time:10-03

Beg a datagrid control in WPF is used to display information from a database table, access database, and realizes the cell editing is completed automatically update data in the database, realizes the increase, delete, change, check the basic function of instance, after editing, I now realize the cell does not immediately update information in the database, but detect the values in the dataset has changed, but the datarow. The satus of value still unchanged, test and modify a cell, and then modify data from another cell, then, for the first time to modify the value is changed, but the second modified values still has not been modified, that is to say, after I modify a value, must make a change in the value of another line of action, this change will only take effect, do not know why, answer, and want to see how everyone is operating the database?

CodePudding user response:

You are editing a cell is active, at the moment, you know what time you are not the end of input, when you move the focus to other cells would know you on the previous input end of the cell, it is a very normal logic, it is not to have to do a modified another line of the value of the action, but the current cell from active to inactive state will trigger

CodePudding user response:

That is there any way to solve this problem?

CodePudding user response:

CELL press enter or loses focus, under the mandatory Update DataTable (like the Update () function)

CodePudding user response:

  •  Tags:  
  • C#
  • Related