New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Server-Side Events

July 2024
Event log

In this example we demonstrate the two main server-side events:

  • DefaultViewChanged - it fires when the default rendered view of the calendar is changed (navigate to another view).
  • SelectionChanged - it fires if a date is selected and the AutoPostback property is set to true.
  • HeaderCellRender - it fires after the generation of every calendar header cell object and just before it gets rendered to the client if some of the properties ShowRowHeaders, ShowColumnHeaders or EnableViewSelector is set to true.

There is also one additional server-side event: DayRender - it fires after all the cells of the calendar are generated and just before it is rendered to the client.
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page CodeFile="DefaultVB.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="Telerik.Web.Examples.Calendar.Programming.ServerSideEvents.DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns=''>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-containers">
        <div class="demo-container" runat="server" id="containerDiv">
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <telerik:AjaxSetting AjaxControlID="RadCalendar1">
                            <telerik:AjaxUpdatedControl ControlID="RadCalendar1"></telerik:AjaxUpdatedControl>
                            <telerik:AjaxUpdatedControl ControlID="EventLogConsole1"></telerik:AjaxUpdatedControl>
            <telerik:RadCalendar RenderMode="Lightweight" ID="RadCalendar1" runat="server" TitleFormat="MMMM yyyy" CultureInfo="English (United States)"
                AutoPostBack="true" OnSelectionChanged="SelectedDateChange" OnDefaultViewChanged="NavigationChanged">
    <qsf:EventLogConsole runat="server" ID="EventLogConsole1"></qsf:EventLogConsole>

Support & Learning Resources

Find Assistance