New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

SelectionChanged

The ASP NET AJAX Calendar control provides the SelectionChanged server event, which is raised when the AutoPostBack property is set to true, and the user changes the current selection by selecting or unselecting a date in the calendar.

The SelectionChanged event handler receives two arguments:

  1. The RadCalendar control whose selection was just changed. This argument is of type object, but can be cast to the RadCalendar type.

  2. A SelectedDatesEventArgs object. This object has a SelectedDates property which is a collection that lists all the dates in the current selection.

Use the SelectionChanged event handler to respond to changes in the calendar's selection:

C#
protected void RadCalendar1_SelectionChanged(object sender, SelectedDatesEventArgs e)
{
    Label1.Text = "Selected dates are:<br />";
    for (int i = 0; i < e.SelectedDates.Count; i++)
    {
        Label1.Text += (e.SelectedDates[i]).Date.ToString() + ",<br />";
    }
}

See Also

In this article
See Also
Not finding the help you need?
Contact Support