Author Topic: Export with grouped columns  (Read 3056 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Export with grouped columns
« on: April 10, 2019, 08:21:26 pm »
Do grouped columns work with local export?

https://paramquery.com/pro/demos/export_local

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Export with grouped columns
« Reply #1 on: April 10, 2019, 10:17:51 pm »
Yes

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: Export with grouped columns
« Reply #2 on: April 11, 2019, 02:33:21 am »
Can't get it to work...do I need to modify anything compared when using no grouped columns?
Looks fine in grid but do not work in export to Excel.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Export with grouped columns
« Reply #3 on: April 11, 2019, 10:02:39 am »
It doesn't need any modification. Do you get any error?

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: Export with grouped columns
« Reply #4 on: April 11, 2019, 12:59:33 pm »
Parent column has hidden: false...

Seems like this:

Code: [Select]
beforeExport: function( event, ui ) {

var Cols = grid.Columns();

Cols.alter(function(){
Cols.each(function(column){
        column.copy = !column.hidden;
})
})}

Causes the parent column not be written out to excel, (although the extra line is there).


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Export with grouped columns
« Reply #5 on: April 11, 2019, 04:40:17 pm »
column.copy is not supported for grouped columns

https://paramquery.com/pro/api#option-column-copy