Limit number of weeks in weekview

9 posts, 1 answers
  1. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 09 May 2012 Link to this post

    Hi,

    I want to be able show a week scheduler that shows as header "Week 1 - Monday", "Week 1 - Tuesdays" ... "Week 2 - Monday", etc...

    I have succeeded in doing that using other threads on the forum. However, i would like to limit the number of weeks that such a scheduleview contains. I want to be able to say that the schedule should only show 9 weeks (so week 1 to week 9)

    The VisibleRange property that should allow this scenario is a readonly property.

    Is there any other way to achieve this?

    Best Regards,

    Peter
  2. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 09 May 2012 Link to this post

    Hello,

    You can use the VisibleDays property of the view definition.

    All the best,
    Rosi
    the Telerik team

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

  3. DevCraft banner
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 09 May 2012 Link to this post

    Hi Rossi,

    I tried that, but all it does is show 1 day per week if you say VisibleDays=1.

    If you set it to 14, you will still be allowed to scroll to week 3

    Best Regards,

    Peter



  5. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 14 May 2012 Link to this post

    Hello,

    Which view definition do you use? Please refer to our documentation which explains in details how to configure every view:
    http://www.telerik.com/help/silverlight/radscheduleview-viewdefinitions-overview.html
    http://www.telerik.com/help/silverlight/radscheduleview-features-viewdefinitions-configure-visiblerange.html
    http://www.telerik.com/help/silverlight/radscheduleview-viewdefinitions-specificproperties.html

    All the best,
    Rosi
    the Telerik team

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

  6. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 14 May 2012 Link to this post

    Hi Rosi,

    Like the title of the thread says: Weekview.

    The documentation says:
    "The VisibleRangeEnd is VisibleRangeStart+VisibleDays for all view definitions."

    In the WeekView this sentence can be understood in more then one way:

    When you set VisibleDays=5 in weekview, you'll get to see 5 days of each week. i can understand that behavior, because you may say that you only want to see the weekdays and not the weekends. 

    However: I want to say, VisibleDays = 21... the calender starts on Jan 1, 2012... i only want to be able to scroll 3 weeks, the calender should simply stop after 3 weeks, but VisibleDays does not allow me to do that, setting VisibleDays on weekview to more then 7 has no impact at all on that view because VisibleDays only takes care of how many days are shown in that view, not how many days the user can scroll thru.

    Best Regards,

    Peter



  7. Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 14 May 2012 Link to this post

    Hello,

    This works as expected at our side.Please review our online demo. Go to WeekView and set the VisibleDays property to 21. Now exactly 3 weeks are shown. Is this the desired behavior?

    Kind regards,
    Rosi
    the Telerik team

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

  8. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 14 May 2012 Link to this post

    Hi Rossi,

    I see what you mean... there is a scrollbar and 3 weeks are shown, but on top you can still navigate past these 3 weeks. If VisibleDays is 21, i would still like to show 7 days but only allow the user to navigate those 3 weeks. VisibleDays does not solve that problem

    Here is the reason why i want to do this:

    I'm showing a modified header that only states "week 1 Day 1", "week 1 Day 2", "week 1 Day 3", etc... without mentioning a year In the navigation bar. i have attached a picture from your demo so you know what i mean, but i will show week 1, week 2, etc... in that header.

    I want to create a scheduler that will allow you to plan X weeks of daily menus. Every X weeks this "cycle" will repeat itself. That's why i don't have any use for a year there and it is not really a "calender" in the traditional sense.

    I do not want to hide the navigation bar and just use a scrollbar that shows X weeks like what you are suggesting. The fact that the user has to click on a button to get to the next week makes that the user has a much better understanding in which week they are adding menus.

    I have succeeded in doing all the formatting in the header, but it doesn't seem possible to stop the user from navigating past those X weeks.

    I hope this clears up the misunderstanding about my purpose.

    Best Regards,

    Peter






  9. Answer
    Rosi
    Admin
    Rosi avatar
    2527 posts

    Posted 17 May 2012 Link to this post

    Hello,

    RadScheduleView does not support properties to configure this behavior. However I suggest you to set the VisibleDays to 21 and remove the navigation arrows by editing the NavigationHeader. For more details please follow the link:
    http://www.telerik.com/community/forums/silverlight/scheduleview/custom-navigation-header-on-scheduleview---hide-view-button-add-custom-button-alter-date-format.aspx

    Kind regards,
    Rosi
    the Telerik team

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

  10. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 17 May 2012 Link to this post

    Hi Rossi,

    Ok, fair enough, i suppose this scenario is too specific for telerik to implement.

    I had already figured out how to replace the header, i have now also wrapped the telerik command to move to next/previous week into my own commands and was able to enable the scenario that i was looking for.

    Thanks for the assistance.

    Best Regards,

    Peter
Back to Top
DevCraft banner