ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: klartextmedia on October 23, 2017, 08:00:53 pm
-
Hi
How can I export the table with all currently set style informations on a cell (color, size etc.). I can set it by pq_cellattr option or by JavaScript...
The user can resize it by mouse, but how do I get this information on export?
Regards
-
ok, meanwhile i've figured out that i can get the data after and grid.refreshCM with accessing grid.colModel. And there is no way to give an height to an row (is this correct?)
-
ok, it seems that I need to collect all values on the dom :-(. Is there really no easy way to export to an html table with all cell informations (width, bgcolor, textcolor, textstyle etc.)?
-
Style information via pq_cellattr or column.render is exported to Excel
but only inline styles set inside column.render can be exported to html. Example red text color in column C are exported in https://paramquery.com/pro/demos/print
Another way is to render all rows and columns of the grid with height:'flex' and width:'flex' and just print the grid directly.
There is no need to set row height in pqgrid as rows have auto height based on the content in cells which is better than manually setting each row height. Example: https://paramquery.com/pro/demos/treegrid-lazy
-
it works, thx. I thougth that i can export the current style information of the td tag, but it's also okay to render a container around the inner html.
@manual height:
I will use pqgrid for a calculation module in a intranet where customers can design their own calculation sheet with the grid as they know it from excel... therefor it would be great if there could
be an option for manual rowheight in future. For the moment they should use newlines to expand empty cells :-).
-
next problem :(
renderer return the following: return "<span style='"+ui.style+";width:"+ui.column._width+"px;display:block'>"+ui.cellData+"</span>";
cellData and _width are returned correctly, but ui.style is always undefined. What can be the reason for this?
-
1. I agree there is a need to map height or rows to Excel export, would be added in the upcoming versions.
2. style and _width ( it's private property ) are not ui properties.
If you are trying to take the whole width of cell, then use a normal div or a div with % width.