3 Columns with only 1 month in the header?

7 posts, 1 answers
  1. Preston
    Preston avatar
    19 posts
    Member since:
    Apr 2009

    Posted 29 Sep Link to this post

    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

  2. Answer
    Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 30 Sep Link to this post

    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.
  3. DevCraft banner
  4. Preston
    Preston avatar
    19 posts
    Member since:
    Apr 2009

    Posted 30 Sep in reply to Nasko Link to this post

    Nasko,

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

    Have a great day!

  5. Preston
    Preston avatar
    19 posts
    Member since:
    Apr 2009

    Posted 04 Oct in reply to Preston Link to this post

    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

  6. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 05 Oct Link to this post

    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.
  7. Preston
    Preston avatar
    19 posts
    Member since:
    Apr 2009

    Posted 05 Oct in reply to Nasko Link to this post

    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

  8. Nasko
    Admin
    Nasko avatar
    586 posts

    Posted 06 Oct Link to this post

    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.
Back to Top
DevCraft banner