All documentation
  • API Reference for older versions
  • datachanged

    [starting from version: 2.306]

    It is triggered after the user edits data. Editing is available in the drill-through view and the flat form. To enable editing, set options.editing to true.

    Data passed to the handler

    Parameter/TypeDescription
    params
    Object
    Contains information about the event.
    params.data
    DataObject[]
    Fields that were updated.

    DataObject

    Property/TypeDescription
    id
    Any
    The id of the data record that was updated.
    If the id field type is not specified in the mapping, the record's row number is returned. In this case, the property's type is always "number".
    field
    String
    The unique name of the field that was updated.
    value
    String
    New value.
    oldValue
    String
    Old value.

    Example

    pivot.on('datachanged', function (e) {
    alert("Data changed - field: "
    + e.data[0].field + ", id: "
    + e.data[0].id
    + ", new value: "
    + e.data[0].value
    + ", previous value: "
    + e.data[0].oldValue);
    });

    Open the example on JSFiddle.

    See also

    ReportObject