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
    Admin
    Dimo avatar
    8331 posts

    Posted 28 Nov 2014 Link to this post

    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.

    http://docs.telerik.com/kendo-ui/web/grid/print-export

    Regards,
    Dimo
    Telerik
     

    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.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top