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

Server-Side Events

Event log
In this example we demonstrate the two main server-side events of RadMonthYearPicker:
  • SelectedDateChanged - it fires if a date is selected and the AutoPostback property is set for the control.
  • ViewCellCreated- this event fires after the cells in MonthYearTableView are created.
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page CodeFile="DefaultCS.aspx.cs" Language="c#" Inherits="Telerik.Web.Examples.Calendar.MonthYearPicker.ServerSideEvents.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
   
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadMonthYearPicker1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadMonthYearPicker1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="EventLogConsole1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div class="demo-container size-thin" runat="server" id="containerDiv">
    <h2>
        RadMonthYearPicker</h2>
    <telerik:RadMonthYearPicker RenderMode="Lightweight" ID="RadMonthYearPicker1" Width="100%" runat="server" AutoPostBack="true"
        OnViewCellCreated="RadMonthYearPicker1_ViewCellCreated"
        OnSelectedDateChanged="RadMonthYearPicker1_SelectedDateChanged">
    </telerik:RadMonthYearPicker>
    </div>
    <qsf:EventLogConsole runat="server" ID="EventLogConsole1"></qsf:EventLogConsole>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance