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

ActiveView range issue

3 Answers 45 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Michael Lilly
Top achievements
Rank 1
Michael Lilly asked on 08 Nov 2011, 04:13 PM
I've got the below code:

private void SetActiveViewRange()
{
    if (ActiveViewDefinition != null)
    {
        if (SelectedBuilding == null || SelectedBuilding.Id == Guid.Empty)
        {
            ActiveViewDefinition.DayStartTime = new TimeSpan(0, 0, 0);
            ActiveViewDefinition.DayEndTime = new TimeSpan(24, 0, 0);
        }
        else
        {
            ActiveViewDefinition.DayStartTime = SelectedBuilding.OpenTime.Value.TimeOfDay;
            ActiveViewDefinition.DayEndTime = SelectedBuilding.CloseTime.Value.TimeOfDay;
        }
    }
}

This gets called when my "building" changes.  This is because we don't want to show times on the ScheduleView that aren't available to the user.

In the Q1 release, when I ran this code, the ScheduleView would be restricted properly and still fill the whole screen.  Now, in the Q2 release, when I run this code, there is a large blank area at the bottom of the ScheduleView.  It's like it's not rebuilding itself to take up the whole screen.  If I do something to cause the ScheduleView to redraw itself (like change the window size) it takes up the whole space.  I can't find any way to force this redraw of the ScheduleView, though.  Can someone point me to the right direction?  Or a better way to do this that won't cause the blank area at the bottom of the ScheduleView?

This worked in Q1, so I'm not sure if the change is a bug or intentional.

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 09 Nov 2011, 09:12 AM
Hi Michael Lilly,

Please try our latest internal build. If the problem still persist I suggest you send us sample running project illustrating the issue. We will test it locally and provide you with a solution or more detailed instructions.

Regards,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Michael Lilly
Top achievements
Rank 1
answered on 09 Nov 2011, 02:19 PM
I'm on 2011.2.1031, and I don't know when I'll be able to try the latest.

Oh well...guess I'll continue to poke around until I find a fix.

Edit:

This seems to fix the problem:

            _scheduleView.ViewportHeight--;
            _scheduleView.ViewportHeight++;

I call that at the end of the method above and it forces the scheduleview to stretch the screen like it's supposed to.
0
Rosi
Telerik team
answered on 10 Nov 2011, 03:57 PM
Hi Michael,

I am glad that you resolved the issue.

Do not hesitate to contact us if you have any additional questions to our controls.

All the best,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Michael Lilly
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Michael Lilly
Top achievements
Rank 1
Share this question
or