SMART datagrid v.1 > Classes > GridExportOptions

Back  Forward

DataLudi.GridExportOptions.datetimeCallback  property

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

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

If this property is not null, datetimeFormat setting will be ignored. 

Defaults to null.

Getter
function datetimeCallback(): Function
Setter
function setDatetimeCallback(value: Function)
Code -1
    $('#export').click(function () {
        DataLudi.exportToExcel(grdMain, {
            taregt:  "local",
            fileName: "dlgrid.xlsx",
            datetimeCallback: function (row, column, v) {
                if (v) {
                    return v.toLocaleDateString();
                } else {
                    return "";
                }
            }
        });
    });
See Also
datetimeFormat
booleanCallback
booleanFormat
numberCallback
numberFormat
GridExcelExporter
exportToExcel
Examples
Excel Exporting