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

FindControl to get Nav/FastNav links?

1 Answer 32 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Andrew Benson
Top achievements
Rank 2
Andrew Benson asked on 24 Feb 2010, 07:49 PM
I read in an earlier post that the controls rendered in the calendar are rendered as text--not as server controls. I'm assuming that also holds true for the nav/fast nav controls.

Is there any way to get a hold of these "controls" before the page is rendered? What I'd like to do is change the NavigateUrl for those controls and replace the "#" with something like "mycal.aspx?MonthYear=2,2010" That way a user can bookmark a specific month in my events calendar.

I suppose I could handle the OnCalenderViewChanging event and create the redirect from there.

Thanks,
Andrew

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 01 Mar 2010, 01:03 PM
Hi Andrew,

You can use RadCalendar's client-side OnCalendarViewChanged event for this purpose. Inside the event handler, you can get the current focused date in the calendar. The current focused date will be returned in a triplet array in the form [year, month, date]. You can then use it to set document.location.search. Here is a sample implementation:

function calendarViewChanged(sender, args)
{
    var focusedDate = sender.get_focusedDate();
    document.location.search = "?MonthYear=" + focusedDate[1] + "," + focusedDate[0];
}


Greetings,
Veli
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.
Tags
Calendar
Asked by
Andrew Benson
Top achievements
Rank 2
Answers by
Veli
Telerik team
Share this question
or