New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the SelectionSettings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class CalendarSelectionSettingsBuilder

Inheritance: objectCalendarSelectionSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the CalendarSelectionSettingsBuilder class.

C#
public CalendarSelectionSettingsBuilder(CalendarSelectionSettings settings)
Parameters:settingsCalendarSelectionSettings

The selection settings.

Methods

Sets the action to which the specified dates must navigate.

C#
public CalendarSelectionSettingsBuilder Action(RouteValueDictionary routeValues)
Parameters:routeValuesRouteValueDictionary

The route values of the Action method.

Returns:

CalendarSelectionSettingsBuilder

Example:
C#
@( Html.Kendo().Calendar()
.Name("calendar")
.Selection(s => s.Action("Save", "Home", new { id = "123" }).Dates(new List<DateTime>(){new DateTime(2024,1,4), new DateTime(2024,1,5)}))
)

Sets the action to which the specified dates must navigate.

C#
public CalendarSelectionSettingsBuilder Action(string action, string controller, object values)
Parameters:actionstring

Name of the action.

controllerstring

Name of the controller.

valuesobject

The route values.

Returns:

CalendarSelectionSettingsBuilder

Example:
C#
@(Html.Kendo().Calendar()
.Name("calendar")
.Selection(s => s.Action("Save", "Home", new { id = "123" }).Dates(new List<DateTime>(){new DateTime(2024,1,4), new DateTime(2024,1,5)}))
)

Defines list of dates that must be rendered with action link.

C#
public CalendarSelectionSettingsBuilder Dates(IList<DateTime> dates)
Parameters:datesIList<DateTime>

List of DateTime objects.

Returns:

CalendarSelectionSettingsBuilder

Example:
C#
@( Html.Kendo().Calendar()
.Name("calendar")
.Selection(s =&gt; s.Dates(new List&lt;DateTime&gt;(){new DateTime(2024,1,4), new DateTime(2024,1,5)}))
)