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

Event VisibleRange?

1 Answer 91 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 05 Jun 2015, 02:53 PM

Hi to all,

in past I used ScheduleView for WPF and Silverlight.

Now I have to use Scheduler for WinForm, but I need to populate DataSource every time change period range, indipendently ViewType.

I need to this features because I can't link this control directly to my database, then I need to know when user change period range that he see.

 Is it possible?

 In WPF and Silverlight I used VisibleRange event.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Jun 2015, 12:37 PM
Hello Dario,

Thank you for writing.

In order to detect when the range is changed you can subscribed to the RadScheduler.ActiveView.PropertyChanged event and detect if the StartDate has been modified. It is important to subscribe to the ActiveViewChanged event as well where you should subscribe to the ActiveView.PropertyChanged event at each view change:
public Form1()
{
    InitializeComponent();
 
    this.radScheduler1.ActiveViewChanged += radScheduler1_ActiveViewChanged;
    this.radScheduler1.ActiveView.PropertyChanged += ActiveView_PropertyChanged;
}
 
private void ActiveView_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
    if (e.PropertyName == "StartDate")
    {
        Console.WriteLine("StartDate is changed");
    }
}
 
private void radScheduler1_ActiveViewChanged(object sender, Telerik.WinControls.UI.SchedulerViewChangedEventArgs e)
{
    this.radScheduler1.ActiveView.PropertyChanged += ActiveView_PropertyChanged;
}

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
Tags
Scheduler and Reminder
Asked by
Dario
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or