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

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

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

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

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

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToComponent()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Expression(string)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Explorer(ModelExplorer)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Name(string)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Deferred(bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.HtmlAttributes(object)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ScriptAttributes(object, bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.Render()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToHtmlString()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ToClientTemplate()WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.AsModule(bool)WidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ComponentWidgetBuilderBase<Timeline<T>, TimelineBuilder<T>>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.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 TimelineBuilder<T> class.

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

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>

Returns the current TimelineBuilder<T> instance.

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 for AlternatingMode

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for AutoBind

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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()
Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for CollapsibleEvents

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DataActionsField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DataDateField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DataDescriptionField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DataImagesAltField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DataImagesField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

Sets the data source configuration of the Timeline.

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

The action that will be used to declare the DataSource.

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 used by the Timeline.

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

The DataSource component that will be used to define the DataSource of the Timeline.

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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

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 for DataSubtitleField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DataTitleField

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for DateFormat

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

Sets specific height for the event in horizontal mode.

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

The value for EventHeight

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

Configures the client-side events.

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

The client events action.

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for EventTemplate

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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>

The Template component which contains the template.

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

Example:
C#
@(Html.Kendo().Timeline&lt;Event&gt;()
.Name("timeline")
.EventTemplate(Html.Kendo().Template()
.AddHtml("&lt;div&gt;Some Content &lt;/div&gt;")
)
)

Specifies the template used to render the event details.

C#
public TimelineBuilder<T> EventTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The JavaScript function which contains the template for EventTemplate

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 templateId)
Parameters:templateIdstring

The ID of the template element for EventTemplate

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view which contains the template for EventTemplate

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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 for EventWidth

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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

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

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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

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

The value for Navigatable

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

Defines the orientation of the Timeline widget

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

The value for Orientation

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.

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

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

The value for ShowDateLabels

Returns:

TimelineBuilder<T>

Returns the current TimelineBuilder<T> instance.