Event VisibleRange?

2 posts, 0 answers
  1. Dario
    Dario avatar
    61 posts
    Member since:
    Apr 2011

    Posted 05 Jun 2015 Link to this post

    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.

  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 08 Jun 2015 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top