SMART datagrid v.1 > Classes > GridExportOptions

[ grids ver.1.3.5]   Back  Forward

DataLudi.GridExportOptions.objectCallback  property

Callback function which returns the value to be saved to Excel among the property of JSON object saved as field value when Data Type of data field is OBJECT

function (row, column, value):*;

If do not specify this callback function, the value which will be exported will be determined according to DataField.keyCallback or keyPath setting. 

Defaults to null.

Getter
function objectCallback(): Function
Setter
function setObjectCallback(value: Function)
Code -1
    new DataLudi.exportToExcel(grid, {
    	target: "local",
    	fileName: "local.xlsx",
    	numberFormat: "#,##0.0",
    	datetimeFormat: "yyyy.mm.dd",
        textFormat: "(\\w{2})(\\w*);$1-$2",
        objectCallback: function (row, column, v) {
            if (column.name() == "amount") {
                v = v.amount * 2;
            }
            return v;
        }
    });
See Also
textCallback
numberCallback
Examples
Object Field
Excel Exporting