Print window contents

2 posts, 0 answers
  1. M
    M avatar
    2 posts
    Member since:
    Nov 2012

    Posted 26 Nov 2014 Link to this post

    I want to print the window contents on window open.  Is there a way to do this?  Thanks.
  2. Dimo
    Dimo avatar
    8406 posts

    Posted 28 Nov 2014 Link to this post


    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.

Back to Top