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

3 Columns with only 1 month in the header?

6 Answers 73 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Preston
Top achievements
Rank 1
Preston asked on 29 Sep 2016, 10:36 PM

Telerik Team,

I am using the following version of your silverlight controls: 2014.1.310.1050

I have the following in my view:

<telerik:RadCalendar x:Name="dateRangeCalendar" Grid.ColumnSpan="3" Columns="3" SelectionMode="Extended" IsTodayHighlighted="False" DisplayDate="{Binding StartDate, Mode=TwoWay}" ViewsHeaderVisibility="Visible" Culture="en-US">
</telerik:RadCalendar>

This will display 3 different columns as expected.  However, the header only displays the FIRST month in the center of the 3 months being displayed.  How can I have the name of the month displayed above EACH associated calendar? 

 

Thank you

6 Answers, 1 is accepted

Sort by
0
Accepted
Nasko
Telerik team
answered on 30 Sep 2016, 08:37 AM
Hello Preston,

In order to achieve the desired appearance of RadCalendar the default Template of the control needs to be modified. In Border with x:Name="Navigation" you could add the additional labels/buttons for the other two months that you desire

We created and attached a sample project for you representing the described approach. In the project two TextBlocks with x:Name Header2 and Header3  were added to display the next two months in the header of the control. Note that if you want those TextBlocks to be Buttons you will need to handle the logic behind the Click event.

Hope this helps.


Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Preston
Top achievements
Rank 1
answered on 30 Sep 2016, 01:34 PM

Nasko,

This led me in the right direction.  I appreciate the quick response.

Have a great day!

0
Preston
Top achievements
Rank 1
answered on 04 Oct 2016, 09:38 PM

Nasko,

I may have spoken too soon.  This does in fact display 3 months as expected.  However, whenever I select a date (not in the first column or the first month) the month changes automatically.  I 'think' it is still behaving as if only one month is being displayed and when you select a day outside of the selected month, it jumps to that month. 

Any help regarding this matter would be appreciated.

Thank you

0
Nasko
Telerik team
answered on 05 Oct 2016, 11:00 AM
Hello Preston,

As explained in my previous response the proposed approach is a custom one and it might needs to be improved. So, in order to achieve the desired behavior the converter for the Text of the TextBlocks placed inside the Template need some improvement.

Please, check the attached sample that demonstrates how exactly the converter needs to be improved.

Hope this helps.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Preston
Top achievements
Rank 1
answered on 05 Oct 2016, 05:28 PM

Nasko,

You were absolutely correct.  It needed to be improved.  It may be worth noting (for future viewers of this post) that the attached project attempted to solve the issue with a ValueConverter.  It would have been very difficult to solve this problem using a ValueConverter AND follow best practices.  I ultimately used an attached property to achieve the desired behavior.

I appreciate your help

0
Nasko
Telerik team
answered on 06 Oct 2016, 07:28 AM
Hello Preston,

I am glad you were able to find more suitable approach that works as expected for you and thank you for sharing it with the community.

If you have any additional questions let us know.

Regards,
Nasko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Calendar
Asked by
Preston
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Preston
Top achievements
Rank 1
Share this question
or