New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnViewSelectorClick
The OnViewSelectorClick client-side event handler of the ASP NET AJAX Calendar is called when the user is about to select an entire view of dates by clicking on the view selector. The event occurs only if the EnableViewSelector property is set to true.
The event handler receives two arguments:
-
the RadCalendar object that fired the event.
-
an event arguments object that exposes the following methods:OnViewSelectorClick event arguments object
Name | Return Type | Arguments | Description |
---|---|---|---|
get_domElement() | HTML element | Returns the DOM element for the view selector | |
set_cancel(value) | bool | Lets you prevent the click from selecting or unselecting the dates in the current view. |
The following example uses the OnViewSelectorClick event to confirm the selection and, if the selection proceeds, to change the appearance of the view selector:
ASPNET
<telerik:RadCalendar RenderMode="Lightweight" ID="RadCalendar1" runat="server" EnableViewSelector="True" >
<ClientEvents OnViewSelectorClick="ConfirmSelection" />
</telerik:RadCalendar>