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

Disable TimeZone on RadSchedulerNavigator

6 Answers 227 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 2
Dario asked on 19 Jun 2015, 07:33 PM

Hi guys,

I would disable a ComboBox that shows all TimeZones, I would set local time and prohibit to change it.

How can I do?

I attached print screen

6 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Jun 2015, 11:09 AM
Hello Dario,

Thank you for writing.

You can hide the TimeZones option in RadSchedulerNavigator by setting the SchedulerNavigatorElement.TimeZonesDropDown.Visibility:
this.radSchedulerNavigator1.SchedulerNavigatorElement.TimeZonesDropDown.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dario
Top achievements
Rank 2
answered on 22 Jun 2015, 11:50 AM
Ok, but how can I set local time?
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 22 Jun 2015, 12:23 PM
Hello Dario,

Thank you for writing back.

You can refer to our Demo application >> Scheduler >> Time Zones example. Additionally, the Time Zones help article is quite useful on this topic.

I hope this information helps. If you have any additional questions, please let me know.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dario
Top achievements
Rank 2
answered on 22 Jun 2015, 01:21 PM

I have already read the article, but when I set my TimeZone in this mode, when I view the Scheduler with SchedulerNavigator appears (in the dropdown) always UTC, my configuration has no effect. Why?

SchedulerTimeZone utcTimeZone = new SchedulerTimeZone(59, "UTC +1");
this.radScheduler1.SystemTimeZone = utcTimeZone;

0
Dario
Top achievements
Rank 2
answered on 22 Jun 2015, 01:23 PM
I forgot, I read http://www.telerik.com/help/winforms/scheduler-views-time-zones.html, but in related video I'm not found nothing video tutorial about Scheduler and TimeZone.
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Jun 2015, 02:45 PM
Hello Dario,

Thank you for writing back.

You should set the DefaultTimeZone property instead. However, the SchedulerNavigatorElement.TimeZonesDropDown is bound to the returned collection by the SchedulerTimeZone.GetSchedulerTimeZones() method. When you create a new SchedulerTimeZone, note that this is not present in the SchedulerNavigatorElement.TimeZonesDropDown.DataSource. Hence, the SchedulerNavigatorElement.TimeZonesDropDown.SelectedValue property will not be changed when the AssociatedScheduler.ActiveView.DefaultTimeZone is changed to your new time zone. I would recommend you to iterate the result collection from the SchedulerTimeZone.GetSchedulerTimeZones() method and find the desired time zone. Then, assign it to RadScheduler.DefaultTimeZone property. Thus, the navigator will be updated.
private void Form1_Load(object sender, EventArgs e)
{
    this.radSchedulerNavigator1.AssociatedScheduler = this.radScheduler1;
    SchedulerTimeZone londonTimeZone = GetSpecificTimeZone("London", "London");
    this.radScheduler1.ActiveView.DefaultTimeZone = londonTimeZone;
}
 
private SchedulerTimeZone GetSpecificTimeZone(string timeZoneLabel, string schedulerLabel)
{
    foreach (SchedulerTimeZone tz in SchedulerTimeZone.GetSchedulerTimeZones())
    {
        if (tz.Label.Contains(timeZoneLabel))
        {
            tz.Label = schedulerLabel;
            return tz;
        }
    }
 
    return null;
}

While working on your case, I have encountered a problem and logged it in our feedback portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - feedback item.

I have also updated your Telerik points.

As to the video about the TimeZones in RadScheduler, I would like to note that currently we are migrating all videos to http://www.telerik.com/videos/winforms and the process is not over yet. 

I hope this information helps. If you have any additional questions, please let me know.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler and Reminder
Asked by
Dario
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Dario
Top achievements
Rank 2
Share this question
or