I already do a lot of separate styling in CSS for printing, but the issue I can't get around for the scrollable grid is the separate table for the fixed column headers. It doesn't allow the headers to be printed on each page (in non-WebKit browsers) like normal thead rows in a single table.
It would be possible for me to create a separate grid just for printing, but I have around 16 in the app so far and I would like the user's choices of sorting and filtering to be kept, so I'd rather not do that.
Ideas?
6 Answers, 1 is accepted
The Grid scrollbar is removed during printing via print CSS. However, this will not be good enough if the table rows are too many to fit on a single sheet of paper, as you have observed. So your options are:
1) reduce the Grid page size
2) destroy the Grid and create a new one with scrolling disabled, setting all sort and filter expressions manually to the dataSource by using its API
3) if option (2) seems too unattractive, you can try getting the innerHTML of the Grid data and its headers, generate a new <table> element on the page and print that instead.
Dimo
the Telerik team
Bryan
Hi,
I have similar challenges. Since this topic has been around quite a while, is there been any other solution that requires less time to implement? :)
The following documentation page demonstrates how to print a scrollable Grid. This is the approach that we can offer at this point.
http://docs.telerik.com/kendo-ui/controls/data-management/grid/print-export
Let me know if you have any specific questions.
Regards,
Dimo
Telerik
Hi Dimo,
Thanks for the prompt response.
My main concern is that we have a page with multiple grids, and if we have to customise each of them this would be taking too much time.
Is there any way to make the grid overflow properly without overlapping the control bellow it? Would it be possible to use a css page break after the grid ends?
Might also worth mentioning that our grids are wrapped in section.
Regards,
TS
The raised topics are related to general web page printing techniques. The same concerns would apply if you have several HTML tables inside scrollable parents. In case you would like to benefit from our technical advice on this scenario, I can recommend our Professional Services.
http://www.telerik.com/professional-services
Regards,
Dimo
Telerik