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

Display data in monthview background

1 Answer 33 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Håkan
Top achievements
Rank 1
Håkan asked on 08 Apr 2013, 06:50 AM
Hi,

We use the ScheduleView in our staffing module.
The month view is used as an overview and today we show some small items of different colors which stands for different types of appointments. We also show the number of appointments in the item (see attached image "today").

Now more and more of our customers wants to se a total sum of hours scheduled for each day without having to go into the more detailed day view. So we would like to display that information as part of the background, just below the day number as showed in my other attached image "requested".
 
Is there anyway I can modify the template, (I guess it would be in TimeRuleMonthViewItemStyle)?
I have already done modifications there to display both month name and day number as you can see in the images.
But that data comes from the Content itself so it wasn't so hard.

I have my own class inherited from Appointment with some extra properties, and a special appointment template for the month view, to be able to display them as the small boxes. But adding a summary property to that class wouldn't really help here since I want to display a summary for all the appointments, and not in each appointment, right?

There are also similar demands from customers, like displaying the text "Christmas Day" below the day number, so please keep that in mind when suggesting a solution.

I can see that TimeRulerMonthViewItem is in fact inherited from ContentControl? Can I extend that class somehow to add some extra properties?

Please advice, best regards,
Håkan

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 11 Apr 2013, 08:05 AM
Hello Håkan,

Straight to your questions:

In order to summarize the duration of the appointment in the current date, you will have to filter them from the AppointmentsSource and calculate it. That is why, I can recommend you to bind this TextBlock, which will display the result directly to your ViewModel. Extending the MonthViewItem will break the logic of the ScheduleView, as it will no be able to recognize it.
Another suggestion is to use SpecialSlots, instead. You could find an example in this online demo. You could create the style of the slot, so that it can display all the information needed.

Hope this information helps.

Greetings,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Håkan
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or