Print CSS for Scheduler

2 posts, 0 answers
  1. Michael
    Michael avatar
    17 posts
    Member since:
    Aug 2010

    Posted 16 Mar 2011 Link to this post

    Hello,

    I'm trying to create a print friendly style sheet to make the rad scheduler appear fully on a printed page portrait or landscape.

    I've had success creating custom rules for the Monthview.  At least in certain browsers.  Other than hiding elements I have this for MonthView:

       
    <style type="text/css" media="print">
            div[style]
            {
                max-width: 670px;
            }
            div.rsOverflowExpand
            {
                width: 668px !important;
            }
            .rsHorizontalHeaderTable
            {
                width: 668px !important;
            }
             
            .rsHorizontalHeaderWrapper
            {
                 
            }
            .rsHorizontalHeaderWrapper div
            {
            }
             
            .rsContentTable
            {
                width: 668px !important;
            }
             
            .rsAptContent
            {
                font-size: 9px !important;
            }
             
            .rsContent table
            {
                width: 668px !important;
            }
             
            .RadScheduler
            {
                width: 670px !important;
            }
        </style>


    the first rule (div[style]) is overriding the inline style.  Scheduler inserts inline fixed pixel styles for many parts along the way.  This rule doesn't work in older browsers.

    I'm having a great difficulty making a print friendly CSS rules for time-line view.

    To make scheduler timerange all appear on a single page without scroll we are programmaticaly setting the column width to %.
    private void SetWidth()
            {
                Double width = 100d / scheduler.TimelineView.NumberOfSlots;
                scheduler.ColumnWidth = new Unit(width, UnitType.Percentage);
            }


    Part of the problem is the appointments have a fixed pixel width.

    We have already implemented a hidden report viewer being populated and printed with a "print" button to get print-ability of our timeline views but direct from browser printing is preferred.  I would think it would be a high priority task for Telerik to provide print friendly CSS for all of their controls since printing is a commonly requested  feature.
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 19 Mar 2011 Link to this post

    Hello Michael,

    Indeed, currently RadScheduler does not provide any built-in printing capabilities. However, I am glad to inform you that export to PDF is in our immediate to-do tasks. This would be similar to RadGrid's current feature - http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/pdfexport/defaultcs.aspx.


    Kind regards,
    Peter
    the Telerik team
Back to Top