Skip to main content


Exports data from a treegrid to a PNG file

png(config?: object): void;


  • config - (optional) an object with export settings. You can specify the following settings for export to PNG:
    • url?: string - (optional) the url of the service that executes export and returns an exported file. This setting is optional, you should use it only if you need to specify the path to your local export service. The default value is
    • name?: string - (optional) the name of the exported file
    • theme?: string - (optional) the exported theme, "light" by default. For custom or overridden themes, enable the exportStyles option
    • exportStyles?: boolean | string[] - (optional) defines the styles that will be sent to the export service when exporting TreeGrid. Use false to prevent all styles from being sent to the export service


// default export

// export with config settings
theme: "dark",

If you use TreeGrid in conjunction with Pagination, only the displayed page will be exported.

Related samples: TreeGrid. Export to PDF/PNG

Related article: Exporting TreeGrid

Related API: exportStyles

Change log: Added in v8.1