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

Change Week Number values

3 Answers 117 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Cheryl
Top achievements
Rank 1
Iron
Cheryl asked on 18 Nov 2013, 02:31 AM
Hello

Is there any way to change the Week Number column values, eg to show the financial week number rather than the calendar week number?

Thanks

Cheryl

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 20 Nov 2013, 03:25 PM
Hello Cheryl,

RadCalendar supports customization of its row and column headers, however it could be set to text or image that is displayed in all rows. Setting different header for every row of the calendar is not supported.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Robert Butler
Top achievements
Rank 1
answered on 06 Mar 2014, 07:51 PM
I don't understand how this couldn't be supported. Every company has different fiscal years/periods/weeks. I saw a post from 2009 about this on the Telerik site and it's still not supported?
0
Viktor Tachev
Telerik team
answered on 11 Mar 2014, 01:59 PM
Hello,

In order to have custom row headers you could use the following workaround. Handle the OnCalendarViewChanged client event for the Calendar control. In the handler you could access the header for every row and set its content accordingly.

For example you could have the following markup for a RadDatePicker control.

<telerik:RadDatePicker runat="server" ID="RadDatePicker1" Calendar-ClientEvents-OnCalendarViewChanged="viewChanged">
</telerik:RadDatePicker>

The handler would look similar to the one below.

function viewChanged(sender, args) {
    for (i = 0; i < sender.CurrentViews[0].DomTable.rows.length - 1; i++) {
        // get row header
        var rowHeaderCell = sender.CurrentViews[0].DomTable.rows[i + 1].cells[0];
 
        // set custom row header content here
        // rowHeaderCell.innerHTML = "...";
    }
 
}


Regards,
Viktor Tachev
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Tags
Calendar
Asked by
Cheryl
Top achievements
Rank 1
Iron
Answers by
Viktor Tachev
Telerik team
Robert Butler
Top achievements
Rank 1
Share this question
or