ScheduleView size - fit to width

11 posts, 1 answers
  1. XamlmaX2
    XamlmaX2 avatar
    31 posts
    Member since:
    Jul 2012

    Posted 16 Feb 2011 Link to this post

    Is there any way to get the scheduleview to fit the width of it's container or does it have to be a fixed width?
    When I put it inside a ScrollViewer it doesn't display scrollbars unless I set the width explicitly.
    Is this something that will be fixed in the future?
    Thanks
  2. George
    Admin
    George avatar
    1332 posts

    Posted 18 Feb 2011 Link to this post

    Hello Pete,

    RadScheduleView should not be placed in ScrollViewer because ScrollViewer will measure it with infinity and this will disable schedule view virtualization. Also ScheduleView has its own scroll bars and will show them when needed.

    Let us know if you need more information.

    All the best,
    George
    the Telerik team
  3. DevCraft banner
  4. XamlmaX2
    XamlmaX2 avatar
    31 posts
    Member since:
    Jul 2012

    Posted 18 Feb 2011 Link to this post

    So that means that the ScheduleView has to have fixed dimensions?
  5. Answer
    hwsoderlund
    hwsoderlund avatar
    419 posts
    Member since:
    Aug 2006

    Posted 18 Feb 2011 Link to this post

    Not at all. Just place it inside a Grid or a Border and it will adapt itself to the space available, and show scrollbars as necessary. But if you place it in a Grid, make sure you do not set the size of the Row/Column to Auto. If you do it will assume that the available space is endless.
  6. XamlmaX2
    XamlmaX2 avatar
    31 posts
    Member since:
    Jul 2012

    Posted 18 Feb 2011 Link to this post

    Great! That's helped a lot. Thanks!
  7. Vitaly
    Vitaly avatar
    2 posts
    Member since:
    Apr 2011

    Posted 13 May 2011 Link to this post

    I have placed it inside a Grid and it still does not adjust. I can see both vertical and horizontal scroll bars, but what I really need is fit it to the width of the window, which it still doesn't do. What do I need to set to make it behave the way I need?
  8. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 16 May 2011 Link to this post

    Hi Vitaly,

    If you have placed RadScheduleView in a Grid and you see the ScrollBars then this means that control needs more width/height than available and will occupy/fill the available area.

    What do you mean with it still doesn't fit?

    Kind regards,
    Hristo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Vitaly
    Vitaly avatar
    2 posts
    Member since:
    Apr 2011

    Posted 16 May 2011 Link to this post

    I expected the control to adjust its columns to fit within the window without scroll bars. Is that possible or it will not adjust less then a certain width?
  10. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 17 May 2011 Link to this post

    Hi Vitaly,

    The columns will adjust only if there is more space then needed. If the space is not enough then we will show the scrollbars.
    With 2011 Q1 Service pack 1 we added new properties which controls scrollbars visibility. If you want you can always hide the scrollbars but then RadScheduleView will be clipped if there is not enough space.

    Best wishes,
    Hristo
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Eric Meehan
    Eric Meehan avatar
    6 posts
    Member since:
    Jun 2010

    Posted 01 Feb 2012 Link to this post

    My team and I would very much appreciate the ability to have the ScheduleView fit its container without scrollbars. Is this something that has been developed since this discussion took place? I would also be interested in hearing about any known workarounds to acheive this.

    Thanks,
    Eric
  12. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 06 Feb 2012 Link to this post

    Hi Eric,

    This could be achieved by setting MinTimeRulerExtent and MaxTimeRulerExtent properties of the ViewDefinitions of RadScheduleView:

    <telerik:RadScheduleView>      
        <telerik:RadScheduleView.ViewDefinitions>
            <telerik:DayViewDefinition x:Name="dvd"  />
            ...
            </telerik:RadScheduleView.ViewDefinitions>
           ....
    </telerik:RadScheduleView>

    dvd.MinTimeRulerExtent = 20d;
    dvd.MaxTimeRulerExtent = Double.PositiveInfinity;

    You can check here for more information about TimeRuler configuration.

    All the best,
    Yana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner