Editing using DexExpress PivotGrid
I have a WinForm with a PivotGridControl bound to a DataTable. The DataTable is populated with a TableAdapter that knows how to update the underlying database table.
There is one field on the datatable that I want to allow the user to update. This field will always appear in the body of the pivotGrid.
I have figured out how to associate an editor with the field. When the user clicks on the cell, the editor appears, the user edits the value, and hits 开发者_运维百科Enter, but this is where I run into trouble.
I cannot figure out which event on the grid (there does not appear to be a gridView) should be used as the PivotGrid equivalent of GridView's RowUpdated event. Without this event, I am struggling to figure out where to put the ta.Update(myTable) statement.
Could someone recommend a technique for updating a database table through a pivotGrid?
Thanks,
Use the EditValueChangedEvent.
The EditValueChanged event is raised after an end-user has modified a cell value and closed the editor. Handle the EditValueChanged event to save changes made by an end-user to a data source.
http://documentation.devexpress.com/#WindowsForms/DevExpressXtraPivotGridPivotGridControl_EditValueChangedtopic
精彩评论