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

Invalid slot index: 18 - getting error in readonly mode radscheduler

7 Answers 70 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
chirag shah
Top achievements
Rank 1
chirag shah asked on 29 May 2010, 02:22 PM

I have radscheduler in readonly mode. Its appointments to be displayed are depend upon some criteria so I am checking condition on its page load event and accordingly setting select command of radscheduler's data source. By default Day mode is selected for radscheduler. but when I am clicking month view and inside it when clicking perticular date the following error occurs

Invalid slot index: 18

the number 18 changes when clicking different date.

I am using asp.net Ajax radscheduler.

Please help me it is very urgent.

7 Answers, 1 is accepted

Sort by
0
chirag shah
Top achievements
Rank 1
answered on 02 Jun 2010, 12:42 PM
Admin please help me ..................

It is very urgent. What can I do to solve the problem above ?
0
T. Tsonev
Telerik team
answered on 02 Jun 2010, 01:15 PM
Hello,

We were unable to reproduce the problem locally. Can you please send us a test page in a support ticket? We'll at least need to see the scheduler definition in the ASPX and any code that you have that is related to it. Thank you.

Greetings,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
chirag shah
Top achievements
Rank 1
answered on 02 Jun 2010, 01:58 PM
when you set SelectedView property of Radscheduler design time and if you change it in page load event such problem will occur. like I have set weekView by default and during page load conditionally I have to set its mode to DayView / WeekView. After trying these check the problem above by clicking any date in month view
0
T. Tsonev
Telerik team
answered on 04 Jun 2010, 10:10 AM
Hi Chirag,

Try calling Rebind() after you finish setting RadScheduler properties in Page_Load. This will force RadScheduler to clear its internal control structure and bind to the new data.

I hope this helps.

Greetings,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chakrapani
Top achievements
Rank 1
answered on 19 Mar 2012, 01:37 PM
Hi,

Thanks in advance and please can any one help me it is very urget requirement.....

Step1: When click on Month
Step2: right click click on new appointmet the it is telling following exception...

Invalid slot index: 25

 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Invalid slot index: 25
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[InvalidOperationException: Invalid slot index: 25]
   Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index) +212
   Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +277
   Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +4704
   Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +108
   Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +39
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +37
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +286
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4178

Code:
<telerik:RadScheduler runat="server"                   
                    DataSourceID="SchedulerDataSource"
                    Skin="Office2007"
                    ID="RadScheduler1"
                    Height="700px" Width="100%" DataKeyField="CalUserEventId"
                    EnableViewState="true"
                    DataSubjectField="Subject"
                    DataStartField="StartTime" 
                    DisplayDeleteConfirmation="true"
                    DataEndField="EndTime"
                    SelectedView="WeekView"
                    ShowViewTabs="true"
                    ShowFullTime="false"                    
                    StartInsertingInAdvancedForm="false"
                    StartEditingInAdvancedForm="false"
                    OnFormCreated="RadScheduler1_FormCreated"
                    OnNavigationComplete="RadScheduler1_NavigationComplete"
                    ShowFooter="False"
                    OnNavigationCommand="RadScheduler1_NavigationCommand"
                    WeekView-WorkDayStartTime="07:00:00"
                    WeekView-DayEndTime="19:00:00"
                    WeekView-DayStartTime="07:00:00"
                    WeekView-EnableExactTimeRendering="true"                  
                    OnAppointmentCommand="RadScheduler1_AppointmentCommand"
                    OnAppointmentDelete="RadScheduler1_AppointmentDelete"
                    DayEndTime="19:00:00"
                    OnAppointmentContextMenuItemClicked="RadScheduler1_AppointmentContextMenuItemClicked"
                    OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                    OnAppointmentUpdate="RadScheduler1_AppointmentUpdate">
                    <AdvancedForm Modal="True" EnableCustomAttributeEditing="True" />
                    <InlineInsertTemplate>
                    </InlineInsertTemplate>
                    <InlineEditTemplate>                      
                    </InlineEditTemplate>
                    <TimelineView UserSelectable="False"  />
                    <TimeSlotContextMenuSettings EnableDefault="True" />
                    <AppointmentContextMenuSettings EnableDefault="True" />
                    <TimeSlotContextMenus>
                        <telerik:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server">
                            <Items>
                                <telerik:RadMenuItem Text="New Event" Value="CommandAddAppointment" runat="server" />
                                <telerik:RadMenuItem Text="Go to today" Value="CommandGoToToday" runat="server" />
                                <telerik:RadMenuItem Text="Show 24 hours..." Value="CommandShow24Hours" runat="server" />
                            </Items>
                        </telerik:RadSchedulerContextMenu>
                    </TimeSlotContextMenus>
                    <Reminders Enabled="True"  />
                     <ResourceTypes>
                    <telerik:ResourceType DataSourceID="SchedulerDataSource" ForeignKeyField="CalendarEventId" KeyField="CalendarEventId" 
                    Name="CalendarEventId" TextField="CalendarEventId" />
                     <telerik:ResourceType DataSourceID="SchedulerDataSource" ForeignKeyField="CalendarId" KeyField="CalendarId" 
                    Name="CalendarId" TextField="CalendarId" />
                    </ResourceTypes> 
                    <WeekView DayEndTime="19:00:00" DayStartTime="07:00:00" EnableExactTimeRendering="True"
                        WorkDayStartTime="07:00:00" />
                    <MultiDayView DayEndTime="19:00:00" />
                </telerik:RadScheduler>              
                <asp:SqlDataSource ID="SchedulerDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:VService %>"
                    SelectCommand="select top 1000 * from View_CalendarEvent where userid=@userid and CalendarId=@CalendarId and starttime<=endtime order by 1 desc">
                    <selectparameters>
                        <asp:Parameter Name="userid"  Type="string" />  
                        <asp:Parameter Name="CalendarId"  Type="Int64" />  
                    </selectparameters>
                </asp:SqlDataSource>
0
Chakrapani
Top achievements
Rank 1
answered on 19 Mar 2012, 01:38 PM
and i have tried with rebind..
still
[InvalidOperationException: Invalid slot index: 5]
Telerik.Web.UI.Scheduler.Views.Week.Model.GetSlotByIndex(String index) +212
Telerik.Web.UI.Scheduler.Views.SchedulerModel.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +277 Telerik.Web.UI.RadScheduler.ProcessPostBackCommand(SchedulerPostBackEvent postBack) +4704
Telerik.Web.UI.RadScheduler.RaisePostBackEvent(String eventArgument) +108 Telerik.Web.UI.RadScheduler.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +39
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +37
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +286
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4178
0
Peter
Telerik team
answered on 22 Mar 2012, 11:13 AM
Hi Chakrapani,

Which version of Telerik controls do you use? Can you replicate the problem with any of the online demos? If not, can you open a support ticket and send us a simple demo of the issue?

Greetings,
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
chirag shah
Top achievements
Rank 1
Answers by
chirag shah
Top achievements
Rank 1
T. Tsonev
Telerik team
Chakrapani
Top achievements
Rank 1
Peter
Telerik team
Share this question
or