This is a migrated thread and some comments may be shown as answers.

Print CSS for Scheduler

1 Answer 114 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 17 Mar 2011, 12:21 AM
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.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Mar 2011, 12:49 PM
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
Tags
Scheduler
Asked by
Michael
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or