ASPxClientTreeListBatchEditApi.SetCellValue(nodeKey, columnFieldNameOrId, value) Method

Sets the specified cell value.

Declaration

SetCellValue(
    nodeKey: string,
    columnFieldNameOrId: string,
    value: any,
    displayText?: string,
    cancelCellHighlighting?: boolean
): void

Parameters

Name Type Description
nodeKey string

A string value that identifies the key of a node containing the processed cell.

columnFieldNameOrId string

A string value that specifies the field name or unique identifier (the column’s WebColumnBase.Name property value) of a column containing the processed cell.

value any

An object that contains the new cell value.

displayText string

A string value that specifies the cell display text.

cancelCellHighlighting boolean

true to cancel highlighting of the modified cell, false to highlight the modified cell.

Remarks

Use the SetCellValue property to change the value of the specified cell when the latter is not in edit mode.

NOTE

The SetCellValue method is not in effect in the following situations:

  • If the column’s TreeListColumnEditFormSettings.Visible property is set to false.
  • If the cell is in edit mode. It is necessary to use the ASPxClientTreeList.BatchEditEndEditing event handler to change the cell value:

    function OnBatchEditEndEditing(s,e) {
        Update(s,e, newValue, displayText);
    }
    function Update(s,e, newValue, displayText){
        setTimeout(function () { s.batchEditApi.SetCellValue(e.visibleIndex, "FieldNameOrID", newValue, displayText(if necessary); }, 0);
    }
    
See Also