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

[Solved] Client Side Navigation on Timeline View

1 Answer 80 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 27 Mar 2013, 10:56 PM
When the user clicks the arrows on the top left to navigate to the next or previous period, I want to move the calendar a specified number of days.  The default behavior is for it to move the number of days that you show.  Here's what I came up with which isn't working.

What I'd really like to do is add 7 days to the currently visible start date.

function clientNavigationCommandHandler(sender, eventArgs) {
            if (eventArgs.get_command() == Telerik.Web.UI.SchedulerNavigationCommand.NavigateToNextPeriod) {
                    var d = new Date();
                       d.setDate(d.getDate() + 7);
 
                sender.set_selectedDate(d);
            }
        }

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 28 Mar 2013, 02:36 PM
Hello,

Your observations are absolutely correct and the RadScheduler client-side method set_selectedDate works only with web service binding. However, you can use RadAjax and update RadScheduler with the approach from this topic: Manually add an AJAX request to a client-side event of an HTML element.

Please find attached a sample project that implements very similar scenario.


Regards,
Boyan Dimitrov
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
Steven
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or