We've got a scheduler that is inside of an ajax panel. People can hit next and previous to look at different schedule combinations. However, when a person clicks Print (which does an export), the next time they click Next or Previous to view another schedule, the scheduler changes it's width. It's like it goes to what it shrunk itself down to in order to fit on a page.
Here is a video: http://screencast.com/t/RiKad4nV4
Here is what I've got for the scheduler settings:
Here is a video: http://screencast.com/t/RiKad4nV4
Here is what I've got for the scheduler settings:
<
telerik:RadScheduler
ID
=
"sched"
SelectedDate
=
"1/2/2000"
runat
=
"server"
ShowHeader
=
"false"
AllowDelete
=
"false"
AllowEdit
=
"false"
AllowInsert
=
"false"
FirstDayOfWeek
=
"Sunday"
ReadOnly
=
"true"
SelectedView
=
"WeekView"
ShowAllDayRow
=
"true"
ShowViewTabs
=
"false"
DataDescriptionField
=
"Description"
DataEndField
=
"EndTime"
DataStartField
=
"StartTime"
DataSubjectField
=
"Name"
DataKeyField
=
"Key"
Height
=
"100%"
RowHeight
=
"17px"
ShowFooter
=
"false"
OnClientNavigationCommand
=
"NavigationCommand"
Localization-AllDay
=
"Online"
Width
=
"100%"
>
<
WeekView
ColumnHeaderDateFormat
=
"ddd"
ReadOnly
=
"true"
EnableExactTimeRendering
=
"true"
/>
<
ExportSettings
OpenInNewWindow
=
"true"
FileName
=
"Scheduler"
>
<
Pdf
PageTitle
=
"Schedule"
Author
=
"Telerik"
Creator
=
"Telerik"
Title
=
"Schedule"
PageHeight
=
"8.5in"
PageWidth
=
"11in"
/>
</
ExportSettings
>
</
telerik:RadScheduler
>
8 Answers, 1 is accepted
0
Hello Adam,
Thank you for contacting Telerik support.
I have inspected the code and the scenario. This behavior is expected when the PageWidth is greater than the PageHeight. I have tested with the default PageHeight="11in" and PageWidth="8.5in" and it worked as expected.
Hope this will help. If you have further questions pease don't hesitate to ask.
Best wishes,
Plamen Zdravkov
the Telerik team
Thank you for contacting Telerik support.
I have inspected the code and the scenario. This behavior is expected when the PageWidth is greater than the PageHeight. I have tested with the default PageHeight="11in" and PageWidth="8.5in" and it worked as expected.
Hope this will help. If you have further questions pease don't hesitate to ask.
Best wishes,
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
Adam
Top achievements
Rank 1
answered on 20 Dec 2011, 02:38 PM
I tried switching the pageheight and pagewidth and it still didn't work.
<
telerik:RadScheduler
ID
=
"sched"
SelectedDate
=
"1/2/2000"
runat
=
"server"
ShowHeader
=
"false"
AllowDelete
=
"false"
AllowEdit
=
"false"
AllowInsert
=
"false"
FirstDayOfWeek
=
"Sunday"
ReadOnly
=
"true"
SelectedView
=
"WeekView"
ShowAllDayRow
=
"true"
ShowViewTabs
=
"false"
DataDescriptionField
=
"Description"
DataEndField
=
"EndTime"
DataStartField
=
"StartTime"
DataSubjectField
=
"Name"
DataKeyField
=
"Key"
Height
=
"100%"
RowHeight
=
"17px"
ShowFooter
=
"false"
OnClientNavigationCommand
=
"NavigationCommand"
Localization-AllDay
=
"Online"
>
<
WeekView
ColumnHeaderDateFormat
=
"ddd"
ReadOnly
=
"true"
EnableExactTimeRendering
=
"true"
/>
<
ExportSettings
OpenInNewWindow
=
"true"
FileName
=
"Scheduler"
>
<
Pdf
PageTitle
=
"Schedule"
Author
=
"Telerik"
Creator
=
"Telerik"
Title
=
"Schedule"
PageHeight
=
"11in"
PageWidth
=
"8.5in"
/>
</
ExportSettings
>
</
telerik:RadScheduler
>
0
Hello Adam,
As far as I understand you, all of the buttons are in the Ajax Panel, not only the scheduler.
Please have in mind that the ExportToPdf method changes the width of the Scheduler dynamically and that is why it needs the postback to resize it to the initial width. So I will recommend you either to place the "Export" button out of the AjaxPanel, or to set the width of the Scheduler after navigation in pixels as shown in the code:
Hope this will help.
All the best,
Plamen Zdravkov
the Telerik team
As far as I understand you, all of the buttons are in the Ajax Panel, not only the scheduler.
Please have in mind that the ExportToPdf method changes the width of the Scheduler dynamically and that is why it needs the postback to resize it to the initial width. So I will recommend you either to place the "Export" button out of the AjaxPanel, or to set the width of the Scheduler after navigation in pixels as shown in the code:
RadScheduler1.Width =1600;
Hope this will help.
All the best,
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
Adam
Top achievements
Rank 1
answered on 23 Dec 2011, 02:10 PM
The toolbar button that does the print is inside of an AjaxPanel. Here is the button HTML:
and here is the Print function that is being called when it is clicked:
So it should be doing a full postback I would imagine and therefore the width thing shouldn't be an issue. Am I correct?
<
telerik:RadToolBarButton
Text
=
"Print"
Value
=
"Print"
PostBack
=
"false"
NavigateUrl
=
"javascript:Print();"
ImageUrl
=
"../Common/Images/print.gif"
>
</
telerik:RadToolBarButton
>
and here is the Print function that is being called when it is clicked:
function
Print() {
__doPostBack(
'Print'
,
''
);
}
So it should be doing a full postback I would imagine and therefore the width thing shouldn't be an issue. Am I correct?
0
Hello Adam,
I have tested with a button, which is outside the Panel and performs full postback. It worked as expected at my side. Please find my test project attached.
Hope this will be helpful.
Greetings,
Plamen Zdravkov
the Telerik team
I have tested with a button, which is outside the Panel and performs full postback. It worked as expected at my side. Please find my test project attached.
Hope this will be helpful.
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
Adam
Top achievements
Rank 1
answered on 03 Jan 2012, 04:16 PM
Moving the button outside of the panel is not really an option since it is part of a toolbar and many of the buttons of the toolbar need to work with the scheduler in an AJAX fashion. So, I'm interested in exploring the option to set the width. However, I can't set it to pixel width because the user could have different screen sizes and they may have maximized the browser or not. Is it possible to set it to a percentage instead and it still work?
0
Hi Adam,
Hope this will be helpful.
Greetings,
Plamen Zdravkov
the Telerik team
You can try checking the size client-side in on the pageLoad event and save it in a HiddenField as shown in the code below :
function
pageLoad(sender, args) {
var
hiddenfield = document.getElementById(
"HiddenField1"
);
var
width = window.document.documentElement.offsetWidth;
hiddenfield.value = width;
}
<
asp:HiddenField
runat
=
"server"
ID
=
"HiddenField1"
/>
protected
void
RadScheduler1_NavigationComplete(
object
sender, SchedulerNavigationCompleteEventArgs e)
{
RadScheduler1.Width = Int32.Parse(HiddenField1.Value)-10;
}
Hope this will be helpful.
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
Adam
Top achievements
Rank 1
answered on 10 Jan 2012, 03:24 PM
Thanks for help and pointing me in the right direction. I was able to get it to work by doing the following:
sched.Width = Unit.Percentage(100)
I set it to the percentage instead of the pixel width whenever I'm moving from one schedule to the next and it displays correctly.