RadControls for ASP.NET AJAX The OnViewSelectorClick client-side event handler 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.
Note |
|---|
The OnViewSelectorClick event is supported by: RadCalendar. |
Two parameters are passed to the event handler:
The following example uses the OnViewSelectorClick event to confirm the selection and, if the selection proceeds, to change the appearance of the view selector:
CopyASPX
<script type="text/javascript">
function ConfirmSelection(sender, eventArgs) {
eventArgs.set_cancel(!confirm("Do you want to change the selection for the entire view?"));
if (!eventArgs.get_cancel()) {
var dom = eventArgs.get_domElement();
if (dom.innerText == "x")
dom.innerText = "-";
else
dom.innerText = "x";
}
}
</script>
<telerik:RadCalendar ID="RadCalendar1" runat="server" EnableViewSelector="True" >
<ClientEvents OnViewSelectorClick="ConfirmSelection" />
</telerik:RadCalendar>
See Also