ActiveView range issue

4 posts, 0 answers
  1. Michael Lilly
    Michael Lilly avatar
    53 posts
    Member since:
    Apr 2010

    Posted 08 Nov 2011 Link to this post

    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.
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 09 Nov 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Michael Lilly
    Michael Lilly avatar
    53 posts
    Member since:
    Apr 2010

    Posted 09 Nov 2011 Link to this post

    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.
  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 10 Nov 2011 Link to this post

    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 >>

Back to Top