Completed
Last Updated: 16 Oct 2014 16:08 by ADMIN
ADMIN
George
Created on: 15 Oct 2014 11:47
Category: Scheduler/Reminder
Type: Bug Report
0
FIX. RadScheduler - Timeline view returns the scrollbar back to MinValue after scrolled to bottom
To reproduce:

Add appointments to TimelineView so that they create a vertical scrollbar. Scroll to bottom and click at the last appointment, you will see that the scrollbar will return back to the start and will hide for a moment

Workaround:

Use the following custom scheduler:

public class Myscheduler : RadScheduler
{
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadScheduler).FullName;
        }
        set
        {
            base.ThemeClassName = value;
        }
    }

    protected override RadSchedulerElement CreateRadSchedulerElement()
    {
        return new MySchedulerElement(this, this.ActiveView);
    }

}

class MySchedulerElement : RadSchedulerElement
{
    public MySchedulerElement(RadScheduler scheduler, SchedulerView view)
        : base(scheduler, view)
    { }

    protected override SchedulerViewElement CreateViewElement()
    {
        if (this.Scheduler.ActiveViewType == SchedulerViewType.Timeline && this.Scheduler.GroupType == GroupType.None)
        {
            return new MyTimelineViewElement(this.Scheduler, this.View);
        }

        return base.CreateViewElement();
    }
}

class MyTimelineViewElement : SchedulerTimelineViewElement
{
    public MyTimelineViewElement(RadScheduler scheduler, SchedulerView view)
        : base(scheduler, view)
    {
    }

    protected override void UpdateVeticalScroll(float presenterHeight, float appointmentsMaxHeight)
    {
        base.UpdateVeticalScroll(presenterHeight, appointmentsMaxHeight + this.VScrollBar.Value);
    }
}
0 comments