The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientTreeList.BatchEditEndEditing Event

Occurs when a tree list leaves the batch edit mode.

Declaration

BatchEditEndEditing: ASPxClientEvent<ASPxClientTreeListBatchEditEndEditingEventHandler<ASPxClientTreeList>>

Event Data

The BatchEditEndEditing event handler receives an argument of the ASPxClientTreeListBatchEditEndEditingEventArgs type. The following properties provide information specific to this event.

Property Description
cancel Gets or sets a value indicating whether the action which raised the event should be canceled.
(Inherited from ASPxClientCancelEventArgs)
nodeKey Gets the processed node's key value.
nodeValues Gets the value of the processed cell.

Remarks

The BatchEditEndEditing event is raised when the tree list leaves the edit mode (for a cell/node) due to an end-user interaction or programmatic call to the ASPxClientTreeListBatchEditApi.EndEdit method. The event provides arguments that allow you to leave a particular cell in the edit mode.

An argument object provided by the events contains the ASPxClientTreeListBatchEditEndEditingEventArgs.nodeValues structure. This is a hashtable that maintains information about editable cells in the following manner:


rowValues = {
   "0": {
      value: "someValue",
      text: "someDisplayText"
   }
}
//Here, "0" is an example of the column index specifying the corresponding node cell

You can manipulate entries of this hashtable to initialize/modify editor values or prevent displaying editors for particular cells by removing the corresponding entries from ASPxClientTreeListBatchEditEndEditingEventArgs.nodeValues.

Note that if the TreeListBatchEditSettings.EditMode property is set to Cell, the ASPxClientTreeListBatchEditEndEditingEventArgs.nodeValues hashtable contains all values of an edited node, but only the value of an edited cell is used to update the node. The edited cell is specified by the ASPxClientTreeListBatchEditStartEditingEventArgs.focusedColumn property passed to the ASPxClientTreeList.BatchEditStartEditing event.

When the BatchEditEndEditing event fires after a cell value edit, the cell value is not yet updated. In this case, to get the updated cell value using the ASPxClientTreeListBatchEditApi.GetCellValue method in the BatchEditEndEditing event handler, use the setTimeout function.


function onBatchEndEditing(s, e) {
    window.setTimeout(function () {
    var index = e.visibleIndex;
    var col = TreeList.GetColumnByField("C2");
    var res = TreeList.batchEditApi.GetCellValue(key, "C2",false);
    console.log(res);
    }, 10);
}
See Also