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

Limit number of weeks in weekview

8 Answers 59 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 09 May 2012, 06:41 AM
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

8 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 09 May 2012, 10:39 AM
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 >>

0
HDC
Top achievements
Rank 1
answered on 09 May 2012, 12:56 PM
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



0
Rosi
Telerik team
answered on 14 May 2012, 08:41 AM
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 >>

0
HDC
Top achievements
Rank 1
answered on 14 May 2012, 08:50 AM
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



0
Rosi
Telerik team
answered on 14 May 2012, 12:02 PM
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 >>

0
HDC
Top achievements
Rank 1
answered on 14 May 2012, 12:19 PM
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






0
Accepted
Rosi
Telerik team
answered on 17 May 2012, 09:30 AM
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 >>

0
HDC
Top achievements
Rank 1
answered on 17 May 2012, 03:41 PM
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
Tags
ScheduleView
Asked by
HDC
Top achievements
Rank 1
Answers by
Rosi
Telerik team
HDC
Top achievements
Rank 1
Share this question
or