ASPxGridView.UpdateEdit() Method
Saves all the changes made and switches the ASPxGridView to browse mode.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
Remarks
End-users can update the edited row by clicking the Update command item.
Example
You can update multiple ASPxGridViews on a ASPxButton click as follows:
- Wrap the ASPxGridView by ASPxCallbackPanel.
- Set the ASPxButton.AutoPostBack to false.
- Call the ASPxClientCallbackPanel.PerformCallback method in the ASPxClientButton.Click event handler.
- Use the
ASPxGridView.UpdateEdit
or the ASPxGridView.CancelEdit to update the grids or cancel editing in the ASPxCallbackPanel.Callback event handler.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-update-multiple-aspxgridviews-with-one-button-and-hide-default-update-cancel-links-e4992
protected void cp_Callback(object sender, CallbackEventArgsBase e) {
switch (e.Parameter) {
case "Update":
gv1.UpdateEdit();
gv2.UpdateEdit();
break;
case "Cancel":
gv1.CancelEdit();
gv2.CancelEdit();
break;
}
}
See Also