MonthYearPicker - Server-Side Events

Event log

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<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

Help Us Improve

Was this example helpful?