SMART datagrid v.1 > Classes > DataOutputOptions

Back  Forward

DataLudi.DataOutputOptions.valueCallbacks  property

Specify callback functions which change the field value as string by each field when exporting data set. 

function (rowIndex:Integer, fieldName:String, value:*): String;

You can specify callback function in the entire fields by valueCallback. The callback specified by this property has precedence. And, if specify this callback or valueCallback, booleanFormat, datetimeFormat will be ignored. 

Defaults to null.

Getter
function valueCallbacks(): Object
Setter
function setValueCallbacks(value: Object)
Code -1
    var outputOptions = {
        callbacks: {
            'addr': function (row, prop, value) {
                return value.substr(0, 10);
            },
            'zipcode': function (row, prop, value) {
                return value.substr(0, 3) + '-' + value.substr(3);
            }
        }
    };
See Also
valueCallback
booleanFormat
datetimeFormat
GridDataSet.exportToCsv
GridDataSet.exportToJson
Examples
Grid Data Set Export