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

Context Menu - Insert Exception

11 Answers 186 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 29 Jan 2009, 05:36 PM
I have a instance where I have a calendar that groups multiple resources together.  I added the context menu to the calendar for inserts.  When I trigger the insert command in Week or Month view the timeslot variable loads properly based on the parameters that are passed from the client script.  But when I attempt to trigger the insert command when the Day view is selected I get a IndexOutOfRangeException.  Cell index out of range: 4.

The views are setup as follows:
  • Daily: GroupBy = Room, GroupDirection = Horizontal
  • Week: GroupBy = Room, GroupDirection = Vertical
  • Month: GroupBy = ""

Code:
        Dim requestParams() As String = e.Argument.Split(Microsoft.VisualBasic.ChrW(32))  
        Dim target As String = requestParams(0)  
        Dim command As String = requestParams(1)  
        If (target = "TimeSlot"Then  
            If (command = "Insert"Then  
                Dim index As String = requestParams(2)  
  
                Dim timeSlot As ISchedulerTimeSlot = rsEvent.GetTimeSlotFromIndex(index)  
                ^---Exception when in Day view---^  

Exception:
System.IndexOutOfRangeException was unhandled by user code
  Message="Cell index out of range: 4"
  Source="Telerik.Web.UI"
  StackTrace:
       at Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index)
       at Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Model.GetSlotByIndex(String index)
       at Telerik.Web.UI.RadScheduler.GetTimeSlotFromIndex(String index)
       at Pages_Main.RadAjaxManager1_AjaxRequest(Object sender, AjaxRequestEventArgs e) in c:\inetpub\wwwroot\Scheduler\Pages\Main.aspx.vb:line 66
       at Telerik.Web.UI.RadAjaxControl.OnAjaxRequest(AjaxRequestEventArgs args)
       at Telerik.Web.UI.RadAjaxControl.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

11 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 30 Jan 2009, 11:24 AM
Hello Josh,

Please, open a support ticket and send us a small working sample which we can test.

Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Josh
Top achievements
Rank 1
answered on 30 Jan 2009, 01:36 PM
Peter,

What do you need for a small working sample.  Do you just need the page or do you need the database as well?

Thanks,
Josh
0
Atanas Korchev
Telerik team
answered on 02 Feb 2009, 05:10 PM
Hello Josh,

We just need a runnable page which demonstrates the problem.

Regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kevin Woram
Top achievements
Rank 1
answered on 30 Dec 2009, 03:51 PM
I am experiencing the same problem intermittently.  I included a stack trace below.  I am using the 2009.3.1103.20 version of the RadScheduler.  Is there a solution for this problem?

System Error Message: An unhandled exception was thrown. (Cell index out of range: 2)
 
**Error Source:  Telerik.Web.UI**
Error Type: System.IndexOutOfRangeException: Cell index out of range: 2 at Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index) at Telerik.Web.UI.RadScheduler.GetTimeSlotFromIndex(String index) at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Stack Trace:   at Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index) at Telerik.Web.UI.RadScheduler.GetTimeSlotFromIndex(String index) at Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) at Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) at Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Error Message: Cell index out of range: 2
0
Kevin Woram
Top achievements
Rank 1
answered on 30 Dec 2009, 04:03 PM
By the way, I have just discovered a way to get the above error repeatably:

1. View the Calendar in Week view. (first day of week is Sunday)  (ex: 12/27/2009 - 1/2/2010)
2. Click on a 'Day of the week' link to go to the Day view for that day.  (ex: Tue, 29)
3. Exception occurs:  (ex:  System Error Message: An unhandled exception was thrown. (Cell index out of range: 2) 
  
IMPORTANT NOTE: 
The index number in the 'Cell index out range:' message corresponds to the index of the 'Day of the week'.   In the above example, I clicked on Tue, so the index number in the exception message was 2.  If I click on Sun., the index in the exception is 0.  If I click on Sat., the index in the exception is 6.

0
T. Tsonev
Telerik team
answered on 05 Jan 2010, 08:27 AM
Hi,

This problem doesn't seem to occur in the scenarios that we tried. Can you reproduce the problem in the online demos?

Can you send us a simple page that demonstrates the issue?

Regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kevin Woram
Top achievements
Rank 1
answered on 05 Jan 2010, 02:49 PM
My RadScheduler has EnableViewState = false to improve performance.  I noticed that when I re-visited the page containing the RadScheduler, it sometimes seemed to be in an inconsistent state:  the scheduler displayed the WeekView but behaved as if it was in DayView on the postback.  I found that when I manually saved and restored the SelectedDate, SelectedView and ShowFullTime settings on the RadScheduler control on every postback and redraw of the page, this problem went away. 

You know, I have noticed in looking over these posts on the Telerik forums that almost every time someone reports a problem, Telerik answers with some variation of this request:

Can you send us a simple page that demonstrates the issue?

It is very difficult for developers like myself who have tight deadlines and are just trying to use your product to get their work done on time to narrow down the problem and provide Telerik with a simple, repeatable test case.  It seems to me that you are asking your customers to do your debugging for you and it seems like a cop-out to me.  I have barely enough time to get my work done:  I have no time to debug your product for you.

When I reported this problem, I provided a lot of detail about the conditions under which it occurred but it did not seem to be enough for your support team to get to the bottom of it.  Do you have access to the source code for the product?  Do you analyze the source code to see what situations might cause the problem to occur?  Or do you simply try some test cases with the scheduler control without analyzing the underlying source code?

 

0
T. Tsonev
Telerik team
answered on 06 Jan 2010, 02:37 PM
Hello Kevin,

The information about the particular configuration is valuable and gives us a better chance to understand the problem. Still, we can't reproduce nor the exception, neither the problems with the scheduler being loaded in an invalid state.

The SelectedDate, SelectedView and ShowFullTime are stored in the control state and storing them manually shouldn't be necessary, but it apparently has an effect in your scenario. We'll keep this in mind.

My apologies if I sounded rude when I requested a sample project. This is indeed a standard practice for us. We've chosen it because it allows us to solve your problem faster, not because we want to burden you with debugging our controls.

The controls are complex enough to make brute-force debugging impractical. The more information we have, the faster we'll be able to get to the real issue.

We have a blog post that goes into details on how to get the best of our support. I hope you'll find it helpful:
http://blogs.telerik.com/stefanrahnev/posts/09-12-21/getting_the_best_out_of_telerik_support.aspx

We're sending you a (very simple) project that we've used for testing. Maybe you could adapt some of your current code to it in order to reproduce the issue?

Greetings,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mike
Top achievements
Rank 1
answered on 24 Nov 2010, 05:27 PM
I have found a problem with the above error happening for me.

I did extensive testing,  trying to figure out what I could have done to cause the errors to pop.

I had a function formatting my data inside of 'Appointment Template'.

I decided that perhaps my function could have been causing the problem.  So I took it out.  And I received the same error.

I then removed all of item template,  and the error no longer happens.

There are more details however.  This is the exact repeatable instance that I get the error.

1.  I am using <AppointmentTemplate>
2. The appointment I am dragging (It happens while dragging) has the same start time as another appointment.  Another words they are side by side on the calendar.

Resizing,  or moving that appointment causes an error every time.

You can edit the appointment start date,  and it does not error, moves the appointment and it can now be drug/resized.

This is the error that is returned if the above requirements are met:

[IndexOutOfRangeException: Cell index out of range: 1]
   Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index) +927
   Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +184
   Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +4698
   Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +108
   Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +42
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
0
Nikolay Tsenkov
Telerik team
answered on 29 Nov 2010, 12:40 PM
Hello Mike,

I was not able to reproduce the problem you experience.
Could you, please, try to reproduce it on this demo: http://demos.telerik.com/aspnet-ajax/scheduler/examples/templates/defaultcs.aspx

Also, perhaps I don't see the connection between the problem you experience and the forum thread you posted it in, but could you, please, specify what exactly it is (the connection)?
Otherwise, please, open a separate thread for the problem you experience, and if you, too, are not able to reproduce the problem on the demo (the link above), please open a support ticket and send us a sample project reproducing the problem.


Regards,
Nikolay Tsenkov
the Telerik team
Browse the vast support resources we have to jumpstart 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
Mike
Top achievements
Rank 1
answered on 29 Nov 2010, 03:15 PM
Yes I posted this in the wrong place.  I have already opened a new thread.
Tags
Scheduler
Asked by
Josh
Top achievements
Rank 1
Answers by
Peter
Telerik team
Josh
Top achievements
Rank 1
Atanas Korchev
Telerik team
Kevin Woram
Top achievements
Rank 1
T. Tsonev
Telerik team
Mike
Top achievements
Rank 1
Nikolay Tsenkov
Telerik team
Share this question
or