Our state of the art Gantt chart


Post by DevHouse »

Is it possible to hide/show certain columns in the export dialog by default? These columns need to be visible in the Gantt chart on the page, but some of them I don't want to export by default.

I couldn't find anything about this in the docs, so if this isn't possible this could be a very useful feature.


Post by Maxim Gorkovsky »

Hello.
We are working on this feature at the moment and soon it should be available: https://github.com/bryntum/support/issues/2052

In current release you can listen to the export dialog events:

grid.features.pdfExport.exportDialog.on({
  show() {
    grid.features.pdfExport.exportDialog.widgetMap.columnsField.value = ['firstName2'] // array of column ids
  }
})

Or override the corresponding method:

Override.apply(class {
  static get target() { return { class : PdfExport } } // pdf export feature class

  showExportDialog() {
    const result = this._overridden.showExportDialog.call(this);
    this.exportDialog.widgetMap.columnsField.value = ...
    return result;
})

Post Reply