ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Mendrace on May 16, 2016, 12:04:49 am

Title: Remove HTML-Tags for export
Post by: Mendrace on May 16, 2016, 12:04:49 am
Hi.

My summaryData contains HTML tags. How can I prevent that these are displayed after exporting to Excel.

Example: <b>Total:</b>

Thanks
Title: Re: Remove HTML-Tags for export
Post by: paramvir on May 16, 2016, 11:30:43 am
Don't add html tags in the data, instead

1. add them in the render callback of the column.

2. add exportRender: false property to the column to prevent export of rendered values.

Example: http://paramquery.com/pro/demos/summary_json
Title: Re: Remove HTML-Tags for export
Post by: Mendrace on May 17, 2016, 12:43:27 am
Thanks for the answer.

But there is one thing I don't understand.

The data for my colModel is loading dynamically and supplied as JSON. How can I give a rendering function for the column in the JSON-Data?
Title: Re: Remove HTML-Tags for export
Post by: paramvir on May 17, 2016, 02:25:31 pm
Quote
The data for my colModel is loading dynamically and supplied as JSON. How can I give a rendering function for the column in the JSON-Data?

That's a valid point. For now it can be done by adding render property after loading colModel JSON data:

grid.getColumn( {dataIndx: 'dataIndx of your column' } ).render = render_callback_function;