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

Bug when drilling down to day view from week view

4 Answers 60 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Myles
Top achievements
Rank 1
Myles asked on 03 Oct 2012, 09:19 AM
We have noticed some strange behavior when drilling down to a day view whilst in a week view.  The delegate attached to the VisibleRangeChangedCommand sometimes fires twice.  We connect the command up in the ScheduleView XAML as follows:

VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"    

The delegate is attached to the command in the view model constructor:

this.VisibleRangeChanged = new DelegateCommand(this.VisibleRangeExecuted, (param) => true);

The problem doesn't exist when drilling into day view from a month view definition.  It only happens intermittently when drilling down into a day view from a week view definition.

Looks like a bug to me.

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 05 Oct 2012, 08:38 AM
Hello Myles,

This is a known issue which is already logged in our PITS. You can vote for it and track its progress here.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Myles
Top achievements
Rank 1
answered on 10 Oct 2012, 01:30 PM
Is there a known work around until the bug is fixed?  We have logic that randomly gets executed twice due to this.
0
Yana
Telerik team
answered on 11 Oct 2012, 07:45 AM
Hi Myles,

We are not aware of any workaround you can use in this case.

We are sorry for the inconvenience.

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Myles
Top achievements
Rank 1
answered on 11 Oct 2012, 08:04 AM
I've found a fairly crude hack:

        private void radScheduleMovements_VisibleRangeChanged(object sender, EventArgs e)
        {
            var range = (sender as RadScheduleView).VisibleRange;
            var dateSlot = (sender as RadScheduleView).MouseOverSlot;


            //Prevent first event firing when clicking on day slot header in month view (where the date header is in a
            //different month e.g Display is for month of September.  Click on day header for 31st August.  Event fires
            //twice.  One for change of month and one for change of day.  Known issue with Telerik ScheduleView control.)
            if (dateSlot != null)
            {
                if (range.End != dateSlot.End && range.Start != dateSlot.Start) return;
            }


            ViewModel.VisibleRangeExecuted(range);
        }
Tags
ScheduleView
Asked by
Myles
Top achievements
Rank 1
Answers by
Yana
Telerik team
Myles
Top achievements
Rank 1
Share this question
or