Page 1 of 1

PDF/PNG Export dialog

Posted: Wed Jul 28, 2021 3:09 pm
by jeanbaptiste.minani

Hello,
I would like to know how to customise default values of this dialog, I want to set few columns as default and set page orientation to landscape,
Please let me know how to achieve this.

Screen Shot 2021-07-28 at 15.04.26.png
Screen Shot 2021-07-28 at 15.04.26.png (183.4 KiB) Viewed 384 times

Thank you


Re: PDF/PNG Export dialog

Posted: Wed Jul 28, 2021 3:11 pm
by Maxim Gorkovsky

Hello.
We are working on export dialog customization at the moment: https://github.com/bryntum/support/issues/2052 It should be available soon.

To implement this in current version please refer to this thread, it contains couple possible solutions: viewtopic.php?p=90580#p90580


Re: PDF/PNG Export dialog

Posted: Wed Jul 28, 2021 3:37 pm
by jeanbaptiste.minani
gantt.features.pdfExport.exportDialog.on({
    show() {
    console.log("log");
      gantt.features.pdfExport.exportDialog.widgetMap.columnsField.value = ['name'] // array of column ids
    }
  });

I am using this solution but it is not working, even the consolo.log is not reached,
any help


Re: PDF/PNG Export dialog

Posted: Thu Jul 29, 2021 10:13 am
by Maxim Gorkovsky

Are there any exceptions logged to the console? Smth like cannot read propery "on" of undefined? In the current release exportDialog does not exist before first showExportDialog call. So first you have to show the dialog and then set up a listener, which would be triggered on the next show.
Overriding showExportDialog should be move convenient.