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

Hide and show next and previous arrows in the navigation pane

2 Answers 50 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mona
Top achievements
Rank 1
Mona asked on 07 Feb 2012, 08:29 PM
I would like to know how to hide and show the next and previous arrows in the navigation pane based on requirements. My requirement is a customer can only look at the scheduler for previous month, current month and next month. So if they are in next month view them i should disable to hide the next month arrow in the navigation pane and if they are in previous month view i should hide or disable the previous month arrow in the navigation pane. I searched around but couldn't find a solution for this problem anywhere.

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 10 Feb 2012, 10:58 AM
Hello Mona,

 
You can use the NavigationComplete event and set the appropriate styles to hide the arrows:

protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
    {
        if (RadScheduler1.SelectedDate.Month == DateTime.Now.Month)
        {
            RadScheduler1.CssClass = "show";
        }
        else if (RadScheduler1.SelectedDate.Month == DateTime.Now.AddMonths(1).Month)
        {
            RadScheduler1.CssClass = "hideNext";
        }
        else if (RadScheduler1.SelectedDate.Month == DateTime.Now.AddMonths(-1).Month)
        {
            RadScheduler1.CssClass = "hidePrev";
        }
    }
/** Move link to the right */
      .show .rsNextDay,.show .rsPrevDay
      {
          display:inline !important;
          }
       
      .hideNext .rsNextDay
      {
          display: none !important;
      }
      .hidePrev .rsPrevDay
      {
           display: none !important;
          }


Hope this will help.

Kind regards,
Plamen Zdravkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Mona
Top achievements
Rank 1
answered on 10 Feb 2012, 07:51 PM
Thanks a lot!! It was very helpful.
Tags
Scheduler
Asked by
Mona
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Mona
Top achievements
Rank 1
Share this question
or