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

Change pace for navigation arrows

3 Answers 55 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jean-Marc
Top achievements
Rank 1
Jean-Marc asked on 21 Jun 2012, 10:47 AM
I'm using timeline view. The previous and next navigation arrows move the range by the number of shown slots.
I would like to be able to decide the pace of navigation.
Let's say the range is one month (30 slots) I would like to move 1 day ahead each time I click on next arrow.

I guess I could do something in the RadScheduler_NavigationComplete event.

Can you help me?
Thanks

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Jun 2012, 12:48 PM
Hi Jean-Marc,

Please, refer to the kb article on Navigating through months in Timeline view.

I hope this helps.

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.
0
Jean-Marc
Top achievements
Rank 1
answered on 25 Jun 2012, 03:38 PM
"  Clicking on the previous or next arrow will take you to the previous or next month. This functionality is achieved by dynamically setting the SelectedDate and TimelineView.NumberOfSlots properties.  "

So the only possible pace is the number of slot. That's not what I need.
Thank you anyway
0
Peter
Telerik team
answered on 28 Jun 2012, 01:29 PM
Hi Jean,

Please, try the following:
<telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="TimelineView"
       TimelineView-NumberOfSlots="30" OnNavigationCommand="RadScheduler1_NavigationCommand">
   </telerik:RadScheduler>

protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
   {
       RadScheduler scheduler = (RadScheduler)sender;
       if (scheduler.SelectedView == SchedulerViewType.TimelineView)
       {
           if (e.Command == SchedulerNavigationCommand.NavigateToNextPeriod)
           {
               scheduler.SelectedDate = scheduler.SelectedDate.AddDays(1);
               e.Cancel = true;
           }
           else if (e.Command == SchedulerNavigationCommand.NavigateToPreviousPeriod)
           {
               scheduler.SelectedDate = scheduler.SelectedDate.AddDays(-1);
               e.Cancel = true;
           }          
       }       
   }

All the best,
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
Jean-Marc
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jean-Marc
Top achievements
Rank 1
Share this question
or