Skip to main content

exportStyles

Optional. Defines the styles that will be sent to the export service when exporting TreeGrid to PDF/PNG

exportStyles?: boolean | string[];

Default value: false

Example

const treegrid = new dhx.TreeGrid("treegrid_container", {
columns: [
// columns config
],
exportStyles: false,
data: dataset
});

By default, the exportStyles property is disabled. Thus, when you export TreeGrid, CSS styles included to the page are not sent to the export service. This reduces the size of the exported data.

If you want some styles to be exported, set string values with the absolute paths to the desired styles to the exportStyles array:

const treegrid = new dhx.TreeGrid("treegrid_container", {
columns: [
// columns config
],
exportStyles: [
"https://mySite.com/exportStyle.css",
"https://mySite.com/secondExportStyle.css"
],
data: dataset
});
tip

You must use only absolute paths not relative ones.

info

You need to enable the property if you want to export Grid with a custom or overridden theme.

Related API:

Change log:

added in v8.1