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

Defines the fluent API for configuring the Telerik UI Timeline for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class TimelineBuilder<T> : WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>, IHtmlString where T : class

Inheritance: objectWidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>TimelineBuilder<T>

Implements: IHtmlString

Inherited Members WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToComponent()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Name(string)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Deferred(bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ModelMetadata(ModelMetadata)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.HtmlAttributes(object)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.AsModule(bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Render()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ScriptAttributes(object, bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToHtmlString()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToClientTemplate()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToString()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Componentobject.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 Timeline class.

C#
public TimelineBuilder(Timeline<T> component)
Parameters:componentTimeline<T>

The component.

Methods

Indicates whether events should be positioned on both sides of the timeline axis. By default all events are displayed on the right side of the timeline axis.

C#
public TimelineBuilder<T> AlternatingMode()
Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.AlternatingMode()
)

Indicates whether events should be positioned on both sides of the timeline axis. By default all events are displayed on the right side of the timeline axis.

C#
public TimelineBuilder<T> AlternatingMode(bool value)
Parameters:valuebool

The value that configures the alternating mode.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.AlternatingMode(false)
)

If set to false, the Timeline will not bind to the data source during initialization, i.e. it will not call the fetch method of the dataSource instance. In such scenarios data binding will occur when the change event of the dataSource instance is fired. By default, autoBind is set to true and the widget will bind to the data source specified in the configuration.

C#
public TimelineBuilder<T> AutoBind(bool value)
Parameters:valuebool

The value that configures the autobind.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.AutoBind(false)
)

Indicates whether events should be positioned on both sides of the timeline axis. By default all events are displayed on the right side of the timeline axis.

C#
public TimelineBuilder<T> CollapsibleEvents()
Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.CollapsibleEvents()
)

Enables the events in the Kendo UI Timeline to be expandable or collapsible. When enabled initially all events are collapsed.

C#
public TimelineBuilder<T> CollapsibleEvents(bool value)
Parameters:valuebool

The value that configures the collapsible events.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.CollapsibleEvents(false)
)

Sets the field of the data item that provides the actions information for the event.

C#
public TimelineBuilder<T> DataActionsField(string value)
Parameters:valuestring

The value that configures the dataactionsfield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.CollapsibleEvents(false)
)

Sets the field of the data item that provides information when the given event happened in time.

C#
public TimelineBuilder<T> DataDateField(string value)
Parameters:valuestring

The value that configures the datadatefield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataDateField("Date")
)

Sets the field of the data item that provides the description information for the event.

C#
public TimelineBuilder<T> DataDescriptionField(string value)
Parameters:valuestring

The value that configures the datadescriptionfield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataDescriptionField("Description")
)

Sets the field of the data item that provides the value for the alt attribute of the images.

C#
public TimelineBuilder<T> DataImagesAltField(string value)
Parameters:valuestring

The value that configures the dataimagesaltfield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataImagesAltField("AltImage")
)

Sets the field of the data item that provides the images information for the event.

C#
public TimelineBuilder<T> DataImagesField(string value)
Parameters:valuestring

The value that configures the dataimagesfield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataImagesField("Image")
)

Sets the data source configuration of the timeline.

C#
public TimelineBuilder<T> DataSource(Action<TimelineReadOnlyDataSourceBuilder> configurator)
Parameters:configuratorAction<TimelineReadOnlyDataSourceBuilder>

The lambda which configures the data source

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataSource(dataSource =&gt;
// configure the data source
dataSource
.Ajax()
.Read(read =&gt; read.Action("Events_Read", "Home"))
)
)

Sets the ID of the DataSource widget used by the Timeline.

C#
public TimelineBuilder<T> DataSource(string dataSourceId)
Parameters:dataSourceIdstring

The id of the DataSource

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataSource("dataSource")
)

Sets the field of the data item that provides the subtitle information for the event.

C#
public TimelineBuilder<T> DataSubtitleField(string value)
Parameters:valuestring

The value that configures the datasubtitlefield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataSubtitleField("Subtitle")
)

Sets the field of the data item that provides the title information for the event.

C#
public TimelineBuilder<T> DataTitleField(string value)
Parameters:valuestring

The value that configures the datatitlefield.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DataTitleField("Title")
)

Sets the date format used to display the date in the event's label

C#
public TimelineBuilder<T> DateFormat(string value)
Parameters:valuestring

The value that configures the dateformat.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.DateFormat("dd/MM/yyyy")
)

Sets specific height for the event in horizontal mode.

C#
public TimelineBuilder<T> EventHeight(double value)
Parameters:valuedouble

The value that configures the eventheight.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventHeight(12)
)

Configures the client-side events.

C#
public TimelineBuilder<T> Events(Action<TimelineEventBuilder> configurator)
Parameters:configuratorAction<TimelineEventBuilder>

The client events action.

Returns:

TimelineBuilder<T>

Example:
C#
@( Html.Kendo().Timeline()
.Name("Timeline")
.Events(events =&gt; events
.Change("onChange")
)
)

Specifies the template used to render the event details.

C#
public TimelineBuilder<T> EventTemplate(string value)
Parameters:valuestring

The value that configures the eventtemplate.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventTemplate("#=data.title#")
)

Specifies the template used to render the event details.

C#
public TimelineBuilder<T> EventTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the eventtemplate.

Returns:

TimelineBuilder<T>

Specifies the template used to render the event details.

C#
public TimelineBuilder<T> EventTemplateHandler(string value)
Parameters:valuestring

The value that configures the eventtemplate.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventTemplateHandler("myHandler")
)

Specifies the template used to render the event details.

C#
public TimelineBuilder<T> EventTemplateId(string value)
Parameters:valuestring

The value that configures the eventtemplate.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventTemplateId("myTemplate")
)

Specifies the template used to render the event details.

C#
public TimelineBuilder<T> EventTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the eventtemplate.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventTemplateId(Html.Partial("SomePartial"))
)

Sets specific width for the event in vertical mode.

C#
public TimelineBuilder<T> EventWidth(double value)
Parameters:valuedouble

The value that configures the eventwidth.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventWidth(12)
)

If set to true, will enable the keyboard navigation for the component.

C#
public TimelineBuilder<T> Navigatable(bool value)
Parameters:valuebool

The value that configures the navigatable.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.Navigatable(true)
)

Defines the orientation of the Timeline widget

C#
public TimelineBuilder<T> Orientation(TimelineOrientation value)
Parameters:valueTimelineOrientation

The value that configures the orientation.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.Orientation(TimelineOrientation.Vertical)
)

If set to false, the event's date label will be hidden.

C#
public TimelineBuilder<T> ShowDateLabels(bool value)
Parameters:valuebool

The value that configures the showdatelabels.

Returns:

TimelineBuilder<T>

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.ShowDateLabels(true)
)