This is a migrated thread and some comments may be shown as answers.
switch datetimepicker navigation buttons
1 Answer 13 Views
This is a migrated thread and some comments may be shown as answers.
ShareDocs
Top achievements
Rank 1
ShareDocs asked on 04 Mar 2013, 07:23 AM
Hi,
is there a way to switch the raddatetimepicker navigation buttons so the right arrow will go backwards and the left will go forward?
i also want to set the fastnavigation button (two arrows button) number of periods through the designer.

so far i've accomplished this by:
((RadDateTimePickerCalendar)this.dtpFromTaarich.DateTimePickerElement.GetCurrentBehavior()).Calendar.Navigating +=
               new CalendarNavigatingEventHandler(dtp_Navigating);
 
void dtp_Navigating(object sender, Telerik.WinControls.UI.CalendarNavigatingEventArgs e)
       {
           if (e.Direction == Telerik.WinControls.UI.CalendarNavigationDirection.Forward)
           {
               if (!e.IsFastNavigation)
                   e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(-1);
               else
                   e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(-12);
           }
           else if (!e.IsFastNavigation)
           {
               e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(1);
           }
           else e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(12);
       }
 
hope i can do it more easily... and with less code :)

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Mar 2013, 02:47 PM
Hi Lior,

Thank you for writing.

Your solution is correct and this is an easiest way to swap the fast navigation buttons. 
We will consider swaping these buttons when the RightToLeft property is set to true - I have logged this as a feature request in our Public Issue Tracking System.

For the time being you should continue to use your solution. 
I updated your Telerik points for request and for the sharing your solution with us.

Greetings,
Peter
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Join us for a FREE webinar to see all the new stuff in action.

Interested, but can’t attend? Register anyway and we’ll send you the recording.
Asked by
ShareDocs
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or