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

7 posts, 0 answers
  1. Hrushikesh Mokashi
    Hrushikesh Mokashi avatar
    172 posts
    Member since:
    Dec 2007

    Posted 22 May 2009 Link to this post

    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



  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 May 2009 Link to this post

    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.
  3. Hrushikesh Mokashi
    Hrushikesh Mokashi avatar
    172 posts
    Member since:
    Dec 2007

    Posted 23 May 2009 Link to this post

    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

  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 25 May 2009 Link to this post

    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.
  5. Benoit Drapeau
    Benoit Drapeau avatar
    4 posts
    Member since:
    Mar 2009

    Posted 28 Oct 2009 Link to this post

    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); 

  6. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 03 Nov 2009 Link to this post

    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.
  7. Zoltán
    Zoltán avatar
    1 posts
    Member since:
    Apr 2020

    Posted 11 Jul 2020 in reply to Shinu Link to this post

    You might also want to cancel if the command is "SwitchToSelectedDay" to disable navigation when clicking on the date in the header
Back to Top