Show Week Numbers in Column Header

8 posts, 0 answers
  1. Aaron
    Aaron avatar
    2 posts
    Member since:
    Aug 2010

    Posted 05 Aug 2010 Link to this post

    Hi,

    I need to show Week Numbers in the Column Header. How can I achieve this since I don't think it is possible to create a format string for week numbers in ColumnHeaderDateFormat?

    thanks
    Aaron
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 05 Aug 2010 Link to this post

    Hello Aaron,

    Please take a look at this forum post for solution.

    All the best,
    Veronica Milcheva
    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
  3. Aaron
    Aaron avatar
    2 posts
    Member since:
    Aug 2010

    Posted 05 Aug 2010 Link to this post

    Hi Veronica,

    I already saw that post but unfortunately it explains how to show the week number in the Scheduler Header. I need to show the week number in the Column Header. I know you can use the ColumnHeaderDateFormat field but unfortunately there is no such format string which gives you Week Number. Is there any other way?

    regards
    Aaron
  4. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 06 Aug 2010 Link to this post

    Hello Aaron,

    Actually the forum post represents a sample way to show the week numbers. If you want to show it in another place - column header  in your example, you can simply edit the code like this:

    function pageLoad() {
                    var scheduler = $find('<%= RadScheduler1.ClientID %>');
                    if (scheduler.get_selectedView() == Telerik.Web.UI.SchedulerViewType.WeekView || scheduler.get_selectedView() == Telerik.Web.UI.SchedulerViewType.DayView) {
                        var weekNumber = document.getElementById("HiddenField1").value;
                        var $ = $telerik.$;
                        $(".rsHorizontalHeaderTable th").text("week #" + weekNumber);
                    }
                }

    This will display week numbers in the Week View.

    Hope this helps.

    Kind regards,
    Veronica Milcheva
    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
  5. Mike
    Mike avatar
    7 posts
    Member since:
    Mar 2011

    Posted 26 Apr 2011 Link to this post

    I am trying to do something similar.  I would like to display the start date and end date in the column header.  Screen shot attached.
  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 29 Apr 2011 Link to this post

    Hi Mike,

    The solution will be similar to Aaron's question.  You need to use HiddenFields to store start and end and again via jQuery you can put the text needed in the column header.

    Regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  7. Mike
    Mike avatar
    7 posts
    Member since:
    Mar 2011

    Posted 29 Apr 2011 Link to this post

    If you look at the screenshot I provided you will notice that I am displaying 10 weeks not just one week.  Wouldn't this require some sort of loop to iterate through the 10 column headings?
  8. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 05 May 2011 Link to this post

    Hi Mike,

    Yes, you need to iterate through the th elements with the help of the jQuery each() function.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top