Batch Editing functionality of RadGrid enables inline client-side editing and performing multiple changes before the user decides to either apply the changes or cancel them. The feature is well integrated with existing RadGrid functionalities like automatic data source operations, hierarchy, selection, validation, template columns and event handling.
The feature could be easily enabled by setting the GridTableView.EditMode property to Batch. Additional properties for configuring the behavior of the functionality can be found in the GridTableView.BatchEditingSettings collection. You can find more details and examples in the Configuration article.
<telerik:RadGrid RenderMode="Lightweight" runat="server" ID="RadGrid1"> <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" EditMode="Batch"> <BatchEditingSettings /> <Columns> . . . </Columns> </MasterTableView> </telerik:RadGrid>
If you want to implement your own CRUD operations instead of using declarative data sources, see the Batch Editing Server-side API article. It also shows how to access and modify the column editor properties on the server.
Once a postback to the server has been initiated, the user input cannot be restored in the browser. This can result in loss of data. To minimize this, use client-side validation and cancel the OnUserAction or OnCommand event in case the batch editing manager
hasChanges()on the client.
The Batch Edit Manager API that lets you get/set cell values and open/close cells.
The OnBatchEditOpened event that lets you modify cell values and controls insides based on other conditions and cell values.
The OnBatchEditOpening event that lets you prevent cells from being opened based on conditions, must like in the OnBatchEditOpened event.
Other events showcased in the Working with templates article that you can use for complex templates, objects and logic.
Keep in mind that such custom logic must be entirely client-side and that the built-in batch editing cannot guarantee it will not cause errors. A few example of scenarios that are not supported are load-on-demand, complex control hierarchy (e.g., having several controls in the template), or any server operations.