SMART datagrid v.1 > Classes > GridExportOptions

[ grids ver.1.3.5]   Back  Forward

DataLudi.GridExportOptions.textCallback  property

Conversion callback function which is called before saving as Excel value when the data type of data field is TEXT or the export value of object field is string. 

function (row, column, value):*;

If specify this property as function, textFormat setting will be ignored. 

Defaults to null.

Getter
function textCallback(): Function
Setter
function setTextCallback(value: Function)
Code -1
    $('#export').click(function () {
        new DataLudi.GridExcelExporter().export(grdMain, {
            url:  "/envelope",
            fileName: "dlgrid.xlsx",
            textCallback: function (row, column, value) {
                if (row % 2 == 1) return value + '_2';
                return value;
            }
        });
    });
See Also
textFormat
numberCallback
datetimeCallback
booleanCallback
Examples
Excel Exporting