Completed
Last Updated: 12 Oct 2020 11:23 by ADMIN
Release LIB 2020.3.1012 (10/12/2020)
Simon
Created on: 23 Sep 2020 13:53
Category: ScheduleView
Type: Bug Report
1
ScheduleView: Timeline display bug when many resources are displayed in a small window and the user enters it through month view

Hello ,

some of our users noticed that the RadScheduleView control has a weird display bug in timeline mode when

  • there are a lot of resources and
  • you enter timeline view after being in month view first and
  • and the window is rather small.

The following screenshot shows, what the timeline should look like (I used the default Calendar template and added a few more resources and random appointments for each resource by modifying SampleContentService.cs a bit, see comments in attachment, and adding the resources in CalendarView.xaml, l.316):

And the following Screenshot shows what the same view looks like under the previously mentioned circumstances. It seems that the resource headers are not rendered anymore and all appointments are stuck to the first row.

 

Steps to reproduce:

  • Start the sample project from the attachment.
  • Check as many checkboxes on the left side as possible
  • Make the window rather small. I don't yet know exactly when the problem occurs. However, it seems to have something to do with scrolling. For me, the problem occured at a window height where around 7 resource lines would have fit into the scheduleview.
  • Switch from Day View to Month View
  • Switch from Month View to Timeline View
  • The scheduleview should now look as in my second screenshot.
  • In case it does not look like in my screenshot:
  • Switch back to Day View (or any other view it seems)
  • change the window size (probably make it smaller)
  • Switch to month view
  • Switch to Timeline View again. Rinse and repeat. Eventually, the display bug should occur pretty reliably.

Whenever this display bug occurs, any change like scrolling, resizing the window, adding an appointment restores the correct layout.

 

This problem seems to exist in UI for WPF 2020 R2 and R3

 

If I can provide you with any more information, please let me know.

 

Regards,

Simon M├╝ller

Hofmann F├Ârdertechnik GmbH


3 comments
ADMIN
Vladimir Stoyanov
Posted on: 06 Oct 2020 11:41

Hello Simon,

Thank you for the update. 

I tested the proposed approach in the shared sample project and I am attaching it for your reference. Note, that any approach that would force a redraw of the UI should be sufficient. I have also added an alternative approach, which includes removing and adding an appointment. You can also try delaying the refresh a bit with a Dispatcher's BeginInvoke

Do check out the updated sample project and let me know, if it helps. 

Regards,
Vladimir Stoyanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Simon
Posted on: 30 Sep 2020 11:32

Hello Vladimir,

Thank you for the answer and the proposed workaround. I adapted your workaround to our code base (See below) but unfortunately, it does not seem to help. I verfied that the ScrollDuration line is hit when the timeline view gets selected. However, the bug still occurs pretty regularly.

By the way: While trying the workaround, I just noticed that in our application the display bug also occurs when switching from any other view (day, week) to the timeline. So we can probably drop the "you enter timeline view after being in month view first " condition.

private void RadScheduleViewTecs_VisibleRangeChanged(object senderEventArgs e)
{
    if (sender is RadScheduleView scheduleView && scheduleView.ActiveViewDefinition is TimelineViewDefinition)
    {
        var appList = scheduleView.AppointmentsSource.Cast<object>().ToList();
 
        if (appList?.FirstOrDefault() is IAppointment app)
        {
            scheduleView.ScrollDuration(app.Start.TimeOfDay);
        }
    }
}
ADMIN
Vladimir Stoyanov
Posted on: 30 Sep 2020 10:41

Hello Simon,

Thank you for the shared project. 

I was able to replicate the scenario on my end and I have logged an item in our internal backlog for it. I have also added some telerik points to your account to thank you for bringing this to our attention. You can follow this item in order to be notified for any updates. 

For the time being, as a workaround, you can handle the VisibleRangeChanged event of the RadScheduleView and refresh the control. Here is a possible approach for doing so:

private void CalendarScheduleView_VisibleRangeChanged(object sender, System.EventArgs e)
        {
            var scheduleView = sender as RadScheduleView;
            if(scheduleView.ActiveViewDefinition is TimelineViewDefinition)
            {
                var app = (scheduleView.AppointmentsSource as IList<Appointment>)[0];
                scheduleView.ScrollDuration(app.Start.TimeOfDay);
            }
        }

Do give it a try and let me know, if it helps.

Regards,
Vladimir Stoyanov
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).