SMART datagrid v.1 > Classes > GridExportOptions

Back  Forward

DataLudi.GridExportOptions.numberCallback  property

Callback function which returns the value of data cell of NUMBER field as the value of Excel cell. 

function (row:GridRow, column:GridColumn, value:*): Number|String;

If set this property as callback function, numberFormat setting will be ignored. 

Defaults to null.

Getter
function numberCallback(): Function
Setter
function setNumberCallback(value: Function)
Code -1
    $('#export').click(function () {
        new DataLudi.GridExcelExporter().export(grdMain, {
            url:  "/envelope",
            fileName: "dlgrid.xlsx",
            numberCallback: function (row, column, v) {
                return Math.max(0, Math.min(10000, v));
            }
        });
    });
See Also
numberFormat
booleanCallback
booleanFormat
datetimeCallback
datetimeFormat
textCallback
textFormat
GridExcelExporter
exportToExcel
Examples
Excel Exporting