SMART datagrid v.1 > Examples

Back  Forward

Dynamic Styles Exporting  Example

When save the grid to an Excel file by calling exportToExcel function, if specify GridExportOptions.applyDynamicStyles as true, you can export an Excel file in which have reflected dynamic styles set in the columns or rows. 

Grid - 1
rows
Code -1
    DataLudi.exportToExcel(grid, {
        target: "local",
        fileName: "dlgrid.xlsx",
        applyDynamicStyles: document.getElementById("chkApplyDynamics").checked
    });

In addition, if specify GridExportOptions.styledText as true, it will be saved as the text in which has applied GridStyles.prefix, suffix or ValueColumn.displayCallback

Grid - 2
rows

View Source JSP 

See Also
GridExportOptions.applyDynamicStyles
GridExportOptions.styledText
exportToExcel
Excel Exporting
Examples
Excel Exporting
Async Excel Exporting