I want to print the window contents on window open. Is there a way to do this? Thanks.
1 Answer, 1 is accepted
0
Dimo
Telerik team
answered on 28 Nov 2014, 11:48 AM
Hello,
In scenarios, in which you want to print a particular container on the page (be it a Window widget or anything else), you have two options:
1. CSS-only solution
Use a print stylesheet and hide everything on the page, except the contents of the Window widget. This contents is inside a <div> element with the Window ID (Name) and a .k-window-content CSS class. This option is viable, if the user will never like to print anything else from the page.
2. Javascript solution
Clone the Window's contents inside a new browser window and print that window. The documentation shows how to do that with the Grid. Your scenario is a lot simpler, so your will need to remove most of the custom CSS and JS code.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.