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

New RowHeight Setting Lost when ExportToPdf

5 Answers 52 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 04 Apr 2012, 08:06 PM
Hello,

I am using Visual Studio 2010 and Telerik.Web.UI, v.2012.1.215.40 (Dev).

My webform has an embedded RadScheduler. I believe that the RowHeight of a scheduler defaults to 25px. At run-time, however, I change the RowHeight property using the following simple code, based on the view selected by the end-user:
protected void radScheduler_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) {
    if (this.radScheduler.SelectedView == SchedulerViewType.TimelineView) {
        this.radScheduler.RowHeight = Unit.Pixel(100);
    }
    else {
        this.radScheduler.RowHeight = Unit.Pixel(25);
    }
}

That works fine and the row heights sucessfully switch between 25 and 100px as the user changes the view.

Then I added a button below the scheduler to export the current scheduler view to a PDF file. The button click code is very basic and is as follows:
protected void btnExport_Click(object sender, EventArgs e) {
    this.radScheduler.ExportToPdf();
}

The click event works fine and successfully creates a PDF file.

When the scheduler is in Timeline view, which successfully displays the row heights at 100px, and the export button is clicked, the row heights are ignored during the export to PDF. The row heights in the PDF file appear to be back at 25px. The webform, which is still open in Timeline view, continues to display the row heights at 100px. How can I resolve this problem?

BTW, if I do away with the NavigationComplete event above, and explicitly add RowHeight="100px" to the <telerik:RadScheduler> ... </telerik:RadScheduler> schema, I still have the same problem when I click my Export to PDF button.

Is there something I can do to maintain the 100px row height whenever I export to PDF?

Thanks,
Steven

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 09 Apr 2012, 11:03 AM
Hello Steven,

 
Unfortunately ExportToPdf method of RadScheduler doesn't support  customizing its view and renders an image with default settings.

Please excuse us for this limitation of our Control.

Hope this information will help you.

Greetings,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Brian
Top achievements
Rank 1
answered on 16 Apr 2012, 02:51 PM
Is there a method, like the DrawToBitmap method, that I could use to work around this limitation. I believe, howver, that the DrawToBitmap method is available to the WinForms controls only. Is there an equivalent or similar method for WebForm (or ASP.NET Ajax) controls?

Thank you.
0
Plamen
Telerik team
answered on 17 Apr 2012, 09:53 AM
Hi Steven,

 
Thank you for your involvement with RadControls. Unfortunately at the moment we are not aware of any workaround for this issue. Please excuse us for the inconvenience caused by this limitation.

Regards,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Janean Angeles
Top achievements
Rank 1
answered on 16 Aug 2012, 04:02 PM
This would actually be more helpful if the styles were controllable or if the export at least defaulted to displaying the entire appointment text.  I'd love to be able to output our calendar via the export method as demo'd, but when the export shrinks up so small (see attached) the content becomes absolutely unusable. (i.e. the entries that say 'Adult' in the attached images really say: 'Adult Tennis Beginners @ HS - 6:30pm'). I've tried all kinds of things to change that, but the export always comes out the same, unusable.
0
Peter
Telerik team
answered on 17 Aug 2012, 04:31 PM
Hi Janean,

Thank you for your feedback and suggestion. We are aware of the current limitations with the PDF export functionality, so we will have a major revision ot it and consider making improvements in the future.

Regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Brian
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Brian
Top achievements
Rank 1
Janean Angeles
Top achievements
Rank 1
Peter
Telerik team
Share this question
or