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

TimelineBuilder

Methods

DataSource(System.Action)

Sets the data source configuration of the timeline.

Parameters

configurator - System.Action<TimelineReadOnlyDataSourceBuilder>

The lambda which configures the data source

Example


            @(Html.Kendo().Timeline<Event>()
                .Name("timeline")
                .DataSource(dataSource =>
                    // configure the data source
                    dataSource
                        .Ajax()
                        .Read(read => read.Action("Events_Read", "Home"))
                )
            )

DataSource(System.String)

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

Parameters

dataSourceId - System.String

The id of the DataSource

Example


            @(Html.Kendo().Timeline<Event>()
                .Name("timeline")
                .DataSource("dataSource")
            )

AutoBind(System.Boolean)

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.

Parameters

value - System.Boolean

The value that configures the autobind.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .AutoBind(false)
                )

AlternatingMode(System.Boolean)

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.

Parameters

value - System.Boolean

The value that configures the alternating mode.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .AlternatingMode(false)
                )

CollapsibleEvents(System.Boolean)

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

Parameters

value - System.Boolean

The value that configures the collapsible events.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .CollapsibleEvents(false)
                )

DataActionsField(System.String)

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

Parameters

value - System.String

The value that configures the dataactionsfield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .CollapsibleEvents(false)
                )

DataDescriptionField(System.String)

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

Parameters

value - System.String

The value that configures the datadescriptionfield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DataDescriptionField("Description")
                )

DataDateField(System.String)

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

Parameters

value - System.String

The value that configures the datadatefield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DataDateField("Date")
                )

DataImagesAltField(System.String)

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

Parameters

value - System.String

The value that configures the dataimagesaltfield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DataImagesAltField("AltImage")
                )

DataImagesField(System.String)

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

Parameters

value - System.String

The value that configures the dataimagesfield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DataImagesField("Image")
                )

DataSubtitleField(System.String)

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

Parameters

value - System.String

The value that configures the datasubtitlefield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DataSubtitleField("Subtitle")
                )

DataTitleField(System.String)

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

Parameters

value - System.String

The value that configures the datatitlefield.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DataTitleField("Title")
                )

EventTemplate(System.String)

Specifies the template used to render the event details.

Parameters

value - System.String

The value that configures the eventtemplate.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventTemplate("#=data.title#")
                )

EventTemplateId(System.String)

Specifies the template used to render the event details.

Parameters

value - System.String

The value that configures the eventtemplate.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventTemplateId("myTemplate")
                )

EventTemplateView(System.Web.Mvc.MvcHtmlString)

Specifies the template used to render the event details.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the eventtemplate.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventTemplateId(Html.Partial("SomePartial"))
                )

EventTemplateHandler(System.String)

Specifies the template used to render the event details.

Parameters

value - System.String

The value that configures the eventtemplate.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventTemplateHandler("myHandler")
                )

EventTemplate(Kendo.Mvc.UI.TemplateBuilder)

Specifies the template used to render the event details.

Parameters

template - TemplateBuilder<TModel>

A Template component that configures the eventtemplate.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventTemplate(Html.Kendo().Template()
                        .AddHtml("<div>Some Content </div>")
                    )
                )

DateFormat(System.String)

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

Parameters

value - System.String

The value that configures the dateformat.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .DateFormat("dd/MM/yyyy")
                )

EventHeight(System.Double)

Sets specific height for the event in horizontal mode.

Parameters

value - System.Double

The value that configures the eventheight.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventHeight(12)
                )

EventWidth(System.Double)

Sets specific width for the event in vertical mode.

Parameters

value - System.Double

The value that configures the eventwidth.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .EventWidth(12)
                )

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

Parameters

value - System.Boolean

The value that configures the navigatable.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .Navigatable(true)
                )

ShowDateLabels(System.Boolean)

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

Parameters

value - System.Boolean

The value that configures the showdatelabels.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .ShowDateLabels(true)
                )

Orientation(Kendo.Mvc.UI.TimelineOrientation)

Defines the orientation of the Timeline widget

Parameters

value - TimelineOrientation

The value that configures the orientation.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .Orientation(TimelineOrientation.Vertical)
                )

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.

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .AlternatingMode(false)
                )

CollapsibleEvents()

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

Example


                @(Html.Kendo().Timeline<Event>()
                    .Name("timeline")
                    .CollapsibleEvents(false)
                )

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<TimelineEventBuilder>

The client events action.

Example


             @( Html.Kendo().Timeline()
                        .Name("Timeline")
                        .Events(events => events
                            .Change("onChange")
                        )
            )

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

Render()

Renders the component.

Example


            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?