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

RadScheduler: Disable the day view nevigation from date header of month view

6 Answers 480 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 22 May 2009, 07:49 AM
Hi,

I am using RadControl Q1 2009.

I am using radscheduler.
In monthview of radscheduler it gives goto dayview  when we click on any date header of monthview.
I want to restrict to go to day view from monthview.
How can i restrict to go tothe day view when click on any date header of monthview ?

Thanks



6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 May 2009, 01:28 PM
Hi Hrushikesh,

I guess you want to restrict the user to navigate to day view after after switching to any other view. If so you can try following code for that.
CS:
 
protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e) 
    if (e.Command == SchedulerNavigationCommand.SwitchToDayView) 
    { 
        e.Cancel = true
    } 

-Shinu.
0
Hrushikesh Mokashi
Top achievements
Rank 1
answered on 23 May 2009, 06:08 AM
Hi,

I want to stop the nevigation from client side using javascript.

I don't want to go to server side event when click on date header in month view.


Thanks

0
Peter
Telerik team
answered on 25 May 2009, 11:14 AM
Hello Hrushikesh,

For this paricular situation,  no client side event occurs which you can hook to. I would go in the same direction as Shinu already suggested - handling NavigationCommand server side.

Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Benoit Drapeau
Top achievements
Rank 1
answered on 28 Oct 2009, 06:23 PM
Hi, in version 2009.2.826.35, it is now possible to handle the OnClientNavigationCommand client side event and detect the SwitchToDayView event and cancel it if needed (see javascript code below). The only problem is that even if the SwitchToDayView event can be cancelled, the user always sees that he can click on the day because of the mouse pointer that changes to a "hand". Is it possible to completely disable the SwitchToDayView (action and visual)?

thanks in advance


function OnClientNavigationCommand(sender, eventArgs) { 
    // 7 = SwitchToDayView 
    if (eventArgs.get_command() == 7) eventArgs.set_cancel(true); 

0
Veselin Vasilev
Telerik team
answered on 03 Nov 2009, 09:16 AM
Hello guys,

There is a nice jQuery solution described here:
Using jQuery to customize RadScheduler

Sincerely yours,
Veselin Vasilev
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
Zoltán
Top achievements
Rank 1
answered on 11 Jul 2020, 03:27 PM
You might also want to cancel if the command is "SwitchToSelectedDay" to disable navigation when clicking on the date in the header
Tags
Scheduler
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Hrushikesh Mokashi
Top achievements
Rank 1
Peter
Telerik team
Benoit Drapeau
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Zoltán
Top achievements
Rank 1
Share this question
or