We're currently using the radscheduler in a project and have recieved a request for week numbers to be displayed in Day and Week view. Is there date format for week number or a way to insert a string containing a week number in the header?
with kind regards
/Truls Bråhammar
Inka Interactive
1 Answer, 1 is accepted
0
Simon
Telerik team
answered on 04 Jul 2008, 11:40 AM
Hello PÄR-OSKAR HOLMGREN,
RadScheduler does not support this functionality out-of-the-box but the
desired effect still can be achieved in the following way:
Override the OnPreRenderComplete event handler of the page.
Get the current week number in the event handler.
Put the week number in the text of the Header wherever it is appropriate.
Below is the code of the overridden OnPreRenderComplete event handler:
The tricky part here is to find the LiteralControl where the Date is displayed in the Header. This - RadScheduler1.Controls[0].Controls[0].Controls[2].Controls[0] - is exactly where the control is located.
As you see, this approach is not the best. We will surely consider
including a support for changing the Header Date Format in a more
flexible way in future versions of RadScheduler.