Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个绑定到数据对象数组的 DataGrid。每次更改任何字段时,如何保持数据的更改(将更新的值保存到数据库)?我应该使用什么事件?
您可以使用 DataGrid.CellEditEnding 事件并执行任何您需要保存或验证数据的操作。
http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid.celleditending.aspx