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

Show Week Numbers in Column Header

7 Answers 81 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 05 Aug 2010, 08:03 AM
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

7 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 05 Aug 2010, 02:20 PM
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
0
Aaron
Top achievements
Rank 1
answered on 05 Aug 2010, 03:11 PM
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
0
Veronica
Telerik team
answered on 06 Aug 2010, 01:22 PM
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
0
Mike
Top achievements
Rank 1
answered on 26 Apr 2011, 06:28 PM
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.
0
Veronica
Telerik team
answered on 29 Apr 2011, 08:51 AM
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.

0
Mike
Top achievements
Rank 1
answered on 29 Apr 2011, 03:29 PM
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?
0
Veronica
Telerik team
answered on 05 May 2011, 12:34 PM
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.

Tags
Scheduler
Asked by
Aaron
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Aaron
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Share this question
or