Menu
Download Free Trial
Table of contents

datachanged

datachanged:String

[starting from version: 2.306]

It is triggered after the user edits data. Editing is available through the Flat view or Drill Through popup. This event should be used when editing is enabled (editing: true). When datachanged is triggered it gets as an input the object with data property. This property is the array of objects. Each of them has the following structure:

  • id – String | Number. Row number (by default) or ID column.
  • field – String. The unique name of the hierarchy that was updated.
  • value – String. New value.

If you want to get the value of the ID column with an event, you should set column type id for this column (read more about data types in JSON and CSV). Such field will not be shown in Fields List but its value will be sent within the event. This helps to identify which row was changed.

Example

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

Open the example on JSFiddle.

See also

Report Object