When printing a xGrid in portrait mode (vertically), it will print all the content, but if there are a lot of columns, it will only print as much as it can within the page and ignore printing the rest of the column data - content to the right not being printed.
When printing a xGrid in landscape mode (horizontally), it will print the rows and ignore printing the rest of the column data - content to the right not being printed.
Here is my JS source code and XML data attached to this topic
I just updated my js files to the new DHTMLxGrid v3.0, which allows me to print in landscape mode now - great fix guys!
Any suggestions is greatly appreciated.
data.zip (3.23 KB)
source.zip (575 Bytes)
How do you print the grid?
I span the report out to its full height and width of the report, which is wider than normal - 25 columns of data.
If the report has too many rows, it will only print the first page of rows. The remaining rows that are printed are just grayed out.
What library/method are you using to print the grid?
I’m using the browsers File Print option when the xGrid contents is displayed within the browser.
You should try to use printView() method to generate print friendly view.
docs.dhtmlx.com/doku.php?id=dhtm … _printview
Please explain how by placing html before and after the xgrid will allow the xGrid to function properly?
I tried your solution suggestion, copying/pasting the code listed online, but it did not resolve the issue.
Please provide any kind of sample or demo link to reconstruct an issue.
THe following code works well dor us:
<div><a href="#" onClick="mygrid.printView('<h1>Print friendly view</h1><p>There is feature which allows you to preview print version of grid.</p>','<p>that text is under the grid</p>')">Printable view</a></div>
I wont be able to give you access to the application since it is being used by outside clients, but i have supplied an example within the forum topic - see attachment.
I used your example code and it did not resolve the issue.
In the sample you’ve posted there is no printView() method calling.
If you have any issue with printView() method please provide a sample with calling of this method and exact steps to reproduce the issue