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

Scheduler Height Error on binding data

15 Answers 176 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Suderson
Top achievements
Rank 1
Suderson asked on 08 Jul 2011, 05:32 AM
Hi,

We are binding few appointments to the scheduler. By default, it will be in month view. But when we click Day View or Week View, an error is been thrown from Javascript and still the scheduler appears in Month View.

The error is as follows:

Error: Sys.WebForms.PageRequestManagerServerErrorException: Height must be non negative.
Parameter name: value

Any hint on solving this issue is appreciated.

15 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 13 Jul 2011, 01:44 PM
Hello Suderson,

Can you please check if you set the GroupBy property?

A code snippet of your implementation would be helpful in providing us with clues.

Regards,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Suderson
Top achievements
Rank 1
answered on 13 Jul 2011, 06:14 PM
Hi.

Wee are making Datakey field of the scheduler to a composite key. This data key will have description with start time and end time. So, in what way group by is useful here??

Here is the design code:

<telerik:RadScheduler ID="radSchedular" ReadOnly="true" runat="server" SelectedView="MonthView"
                            Width="100%" Height="100%" OverflowBehavior="Expand" DataKeyField="allDetails"
                            DataSubjectField="Description" DataStartField="CustDate" DataEndField="DateCompleted"
                            TimeZoneOffset="03:00:00" FirstDayOfWeek="Monday" ShowFullTime="True" LastDayOfWeek="Sunday"
                            WorkDayEndTime="23:00:00" WorkDayStartTime="00:00:00" Skin="Web20" OnAppointmentCreated="radSchedular_AppointmentCreated"
                            OnDataBound="radSchedular_DataBound" OnClientTimeSlotContextMenu="CancelInserting"
                            AllowDelete="False" AllowEdit="False" AllowInsert="False">
                            <TimelineView UserSelectable="false" />
                        </telerik:RadScheduler>

This is the code which will populate the scheduler

private void BindScheduler()
    {
        XmlDataProviderForSchedular objclass = new XmlDataProviderForSchedular();
        radSchedular.DataSource = objclass.GetAllAppointments();
        radSchedular.DataBind();

    }
0
Peter
Telerik team
answered on 18 Jul 2011, 03:04 PM
Hi Suderson,

The GroupBy property can be used if you have defined resources. If that's not the case, please open a support ticket and send us a simple working demo of the problem.

All the best, Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Suderson
Top achievements
Rank 1
answered on 02 Aug 2011, 07:13 AM
Apart from this, we have a problem in the Next and previous month navigation. When we click any of the button, it is going to the top of the page and coming down to the control. My client hates this behaviour. We already have the control inside the update panel. Still we have the issue. But this behaviours is not occuring when we click the calendar in the scheduler and move to the oither months.

We are surprised with the kind of behaviour it has in the next and previous month navigation. We tried removing the update panel and using the telerik ajax settings, still fails. Can anyone help me. IS this the problem with the control. The code is already in the site. Please see above

Please help us.
0
Peter
Telerik team
answered on 03 Aug 2011, 02:24 PM
Hello Suderson,

Can you send us a live url of the issue or open a support ticket and attach a simple demo which we can test?
Note that we cannot replicate such a problem with the online demos.

Kind regards,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Suderson
Top achievements
Rank 1
answered on 05 Aug 2011, 06:04 AM
The following is the code for the control and populating it.

<telerik:RadScheduler ID="radSchedular" ReadOnly="true" runat="server" SelectedView="MonthView"
Width="100%" Height="100%" OverflowBehavior="Expand" DataKeyField="allDetails"
DataSubjectField="Description" DataStartField="CustDate" DataEndField="DateCompleted"
TimeZoneOffset="03:00:00" FirstDayOfWeek="Monday" ShowFullTime="True" LastDayOfWeek="Sunday"
WorkDayEndTime="23:00:00" WorkDayStartTime="00:00:00" Skin="Web20" OnAppointmentCreated="radSchedular_AppointmentCreated"
OnDataBound="radSchedular_DataBound" OnClientTimeSlotContextMenu="CancelInserting"
AllowDelete="False" AllowEdit="False" AllowInsert="False">
<TimelineView UserSelectable="false" />
</telerik:RadScheduler>

This is the code which will populate the scheduler

private void BindScheduler()
{
XmlDataProviderForSchedular objclass = new XmlDataProviderForSchedular();
radSchedular.DataSource = objclass.GetAllAppointments();
radSchedular.DataBind();

}               
0
Peter
Telerik team
answered on 05 Aug 2011, 08:35 AM
Hi Suderson,

I suspect the problem could be with your custom provider and the way you initialize it. Here is a help topic for reference - http://www.telerik.com/help/aspnet-ajax/scheduler-using-data-provider.html

You can set the provider from code-behind too. For example -
protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     RadScheduler1.Provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), true);
 }

Attached are too samples for your perusal.


Regards, Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Suderson
Top achievements
Rank 1
answered on 08 Aug 2011, 06:06 AM
Hi,

We tried the things you mentioned and also gon through the samples that you have given, unfortunately we weren't able to solve it. Still both the problem persists
0
Peter
Telerik team
answered on 10 Aug 2011, 04:23 PM
Hi Suderson,

Without a sample project, I cannot be sure what could be causing the issue.

Regards,
Peter
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Jyoti
Top achievements
Rank 1
answered on 14 Nov 2011, 08:42 AM
Error: Sys.WebForms.PageRequestManagerServerErrorException: Height must be non negative.
Parameter name: value
getting this error while moving from day schedule to week schedule in radscheduler
plz help

here is the code for rad scheduler

<

telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Windows7"

Height="551px" ShowFooter="false"

TimeZoneOffset="03:00:00"

DayStartTime="08:00:00" DayEndTime="21:00:00"

EnableDescriptionField="true"

DataEndField="EndDate" DataKeyField="ID" DataStartField="StartDate"

AppointmentStyleMode="Default"

OnNavigationComplete="RadScheduler1_NavigationComplete"

OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"

OnAppointmentDelete="RadScheduler1_AppointmentDelete"

OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"

OnAppointmentInsert="RadScheduler1_AppointmentInsert">

<AdvancedForm Modal="true" />

<TimelineView UserSelectable="false" />

<ResourceStyles>

<telerik:ResourceStyleMapping Type="Calendar" Text="Development" ApplyCssClass="rsCategoryPattern" BorderColor="#B0CC9B" />

<telerik:ResourceStyleMapping Type="Calendar" Text="Marketing" ApplyCssClass="rsCategoryRed" />

<telerik:ResourceStyleMapping Type="Calendar" Text="Work" BackColor="#edd5b7" BorderColor="#cdb597" />

</ResourceStyles>

<AppointmentTemplate>

<div class="rsAptSubject">

<%# Eval("Subject") %>

</div>

</AppointmentTemplate>

<TimeSlotContextMenuSettings EnableDefault="true" />

<AppointmentContextMenuSettings EnableDefault="true" />

</telerik:RadScheduler>

 


0
Jyoti
Top achievements
Rank 1
answered on 14 Nov 2011, 10:24 AM
Error: Sys.WebForms.PageRequestManagerServerErrorException: Height must be non negative.
Parameter name: value
getting this error while moving from day schedule to week schedule in radscheduler
need help

here is the code for rad scheduler

<

telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Windows7"

Height="551px" ShowFooter="false"

TimeZoneOffset="03:00:00"

DayStartTime="08:00:00" DayEndTime="21:00:00"

EnableDescriptionField="true"

DataEndField="EndDate" DataKeyField="ID" DataStartField="StartDate"

AppointmentStyleMode="Default"

OnNavigationComplete="RadScheduler1_NavigationComplete"

OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"

OnAppointmentDelete="RadScheduler1_AppointmentDelete"

OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"

OnAppointmentInsert="RadScheduler1_AppointmentInsert">

<AdvancedForm Modal="true" />

<TimelineView UserSelectable="false" />

<ResourceStyles>

<telerik:ResourceStyleMapping Type="Calendar" Text="Development" ApplyCssClass="rsCategoryPattern" BorderColor="#B0CC9B" />

<telerik:ResourceStyleMapping Type="Calendar" Text="Marketing" ApplyCssClass="rsCategoryRed" />

<telerik:ResourceStyleMapping Type="Calendar" Text="Work" BackColor="#edd5b7" BorderColor="#cdb597" />

</ResourceStyles>

<AppointmentTemplate>

<div class="rsAptSubject">

<%# Eval("Subject") %>

</div>

</AppointmentTemplate>

<TimeSlotContextMenuSettings EnableDefault="true" />

<AppointmentContextMenuSettings EnableDefault="true" />

</telerik:RadScheduler>

0
Dev
Top achievements
Rank 1
answered on 24 Aug 2012, 04:12 PM
I see this error too some of the time.  We have three sites, call them A, B and C and we're displaying rooms from those sites as resources on the scheduler.  Site A has 7 rooms, Site B has 193 rooms and Site C has 295 rooms.  Switching between month and timeline view works fine when viewing Site A, but I get the above errors (and some others like them) when trying to switch to month view on Site B or Site C.

Clearly there's some boundary between 7 and 193 where there's too many resources for the scheduler to display in month view because it causes an overflow somewhere in a height calculation.  I've not worked out whereabouts that boundary is yet.

Rob
0
Dev
Top achievements
Rank 1
answered on 24 Aug 2012, 04:44 PM
Even when I restrict to as few as ten resources I can still trigger the error.  It seems that the number of appointments is also a factor.

Rob
0
Ivana
Telerik team
answered on 29 Aug 2012, 09:03 AM
Hello,

I have tested the RadScheduler defined as in the Jyoti's post, but I was unable the replicate the described troubled behavior. In order to identify the cause of this issue we will need a sample project/page on which it is replicated so we will be able to troubleshoot the problems locally.

Thank you!

Kind regards,
Ivana
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
Dev
Top achievements
Rank 1
answered on 29 Aug 2012, 10:58 AM
I have created a support ticket.

Rob
Tags
Scheduler
Asked by
Suderson
Top achievements
Rank 1
Answers by
Peter
Telerik team
Suderson
Top achievements
Rank 1
Jyoti
Top achievements
Rank 1
Dev
Top achievements
Rank 1
Ivana
Telerik team
Share this question
or