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

insert chart inside day cell

3 Answers 61 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Arvind Dhasmana
Top achievements
Rank 1
Arvind Dhasmana asked on 06 May 2010, 12:43 PM
Hi

Please refer snapshot for the requirement and let me know that how it can be achieved .
I was using Silverlight Calendar control but not able to display the contents of chart clearly + i don't how how data will be binded for this

Please give me some code structure wit hbinding wise that how it can be attached.

Regards
Charu Pahuja

3 Answers, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 11 May 2010, 12:59 PM
Hi Arvind Dhasmana,

It is possible to insert the chart. I have created custom DayButtonStyle for the RadCalendar. The chart is Collapsed by default. The ControlTemplate for the DayButtonStyle defines several states for the role of the button and when it is in Date states the RadChart's visibility is set to Visible.

There is additional class that defines attached property which sets the ItemsSource of the RadCharts within the buttons. It uses ParentOfType to find the CalendarButton in which the chart is and gets the Date from it so you can set different sources for the different dates.

You can create additional attached property yourself that can be set on the RadCalendar and use it in some way to modify the date button charts.

You can further customize the RadCalendar's xaml to match your design. It's relatively easy to do so in Blend.

Sincerely yours,
Panayot
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.
0
charu
Top achievements
Rank 1
answered on 11 Jul 2010, 12:16 PM
Hi,

I the above mentioned case how to handle the previous & next month data.
I.e data not get loaded for those months.

Please reply how to handle this.

Regards,
Charu
0
Pana
Telerik team
answered on 13 Jul 2010, 12:23 PM
Hello Charu,

You can add an attached behavior for the CalendarButtons that OnLoaded will use ParentOfType<RadCalendar>() to find the calendar in which they are placed and then listen a proper event and update their datasource.

Kind regards,
Panayot
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
Tags
Calendar
Asked by
Arvind Dhasmana
Top achievements
Rank 1
Answers by
Pana
Telerik team
charu
Top achievements
Rank 1
Share this question
or