ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: webeetle on May 12, 2016, 03:20:05 pm

Title: ExportData Functionality
Post by: webeetle on May 12, 2016, 03:20:05 pm
Hi all,
there's a way to exclude specific column/s from the export data functionality?
For example a cell that contains a button group? 

thanks
Title: Re: ExportData Functionality
Post by: paramvir on May 12, 2016, 05:27:59 pm
1) If it's a non-grouped column, then adding copy: false property to the column excludes it from exported data.

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


2) If it's part of grouped column, then it can be excluded by hiding the column in beforeExport event and showing it back in exportData event.

Code: [Select]
beforeExport: function(){
this.getColumn({dataIndx: 'dataIndx of column' }).hidden = true;
this.option('colModel', this.option('colModel'));
},
exportData: function(){
this.getColumn({dataIndx: 'dataIndx of column' }).hidden = false;
this.option('colModel', this.option('colModel'));
}

Title: Re: ExportData Functionality
Post by: webeetle on May 12, 2016, 06:22:07 pm
Thank you  ;)
Title: Re: ExportData Functionality
Post by: mleitao on June 20, 2019, 12:37:44 am
What can we do in the case of multiple exports, in my case I have two types of exports for the same grid one for the data where the user can just download all or any columns that they choose, and the another one for a standard template regardless of shown or hidden columns.
Title: Re: ExportData Functionality
Post by: paramvir on June 20, 2019, 10:50:30 am
Same logic applies to any number of exports from the grid.