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

Kendo UI Timeline TagHelper TimelineTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-timeline")]
[RestrictChildren("datasource", new string[] { "timeline-event-template" })]
public class TimelineTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<DataSourceTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseTimelineTagHelper

Implements: IDataBoundWidget<DataSourceTagHelper>ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

    <kendo-timeline name="Timeline"
                   orientation="vertical"
                   datadatefield="EventDate"
                   datatitlefield="Title"
                   datasubtitlefield="Subtitle"
                   datadescriptionfield="Description"
                   dataactionsfield="Actions"
                   dataimagesfield="Images"
                   alternating-mode="true"
                   collapsible-events="true">
       <datasource>
           <transport>
               <read url="@Url.Action("GetTimelineData","Timeline")" />
           </transport>
           <schema>
               <model>
                   <fields>
                       <field name="EventDate" type="date"></field>
                       <field name="Title" type="string"></field>
                       <field name="Subtitle" type="string"></field>
                       <field name="Description" type="string"></field>
                   </fields>
               </model>
           </schema>
       </datasource>
   </kendo-timeline>

Constructors

Initializes a new instance of the TimelineTagHelper class.

C#
public TimelineTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

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 bool? AlternatingMode { get; set; }

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 bool? AutoBind { get; set; }

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

C#
public bool? CollapsibleEvents { get; set; }

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

C#
[HtmlAttributeName("dataactionsfield")]
public string DataActionsField { get; set; }

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

C#
[HtmlAttributeName("datadatefield")]
public string DataDateField { get; set; }

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

C#
[HtmlAttributeName("datadescriptionfield")]
public string DataDescriptionField { get; set; }

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

C#
[HtmlAttributeName("dataimagesaltfield")]
public string DataImagesAltField { get; set; }

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

C#
[HtmlAttributeName("dataimagesfield")]
public string DataImagesField { get; set; }

The Id of the data source.

C#
public string DatasourceId { get; set; }

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

C#
[HtmlAttributeName("datasubtitlefield")]
public string DataSubtitleField { get; set; }

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

C#
[HtmlAttributeName("datatitlefield")]
public string DataTitleField { get; set; }

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

C#
public string DateFormat { get; set; }

Sets specific height for the event in horizontal mode.

C#
public double? EventHeight { get; set; }

Specifies the template used to render the event details.

C#
public string EventTemplate { get; set; }

Specifies the template used to render the event details. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string EventTemplateHandler { get; set; }

Specifies the template used to render the event details. This option expects the ID of the script element that contains the template.

C#
public string EventTemplateId { get; set; }

Specifies the template used to render the event details. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent EventTemplateView { get; set; }

Sets specific width for the event in vertical mode.

C#
public double? EventWidth { get; set; }

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

C#
public bool? Navigatable { get; set; }

The name of the JavaScript function that will handle the actionClick event. Fires when an action for an event is clicked.

C#
public string OnActionClick { get; set; }

The name of the JavaScript function that will handle the change event. Fires when a new event is opened.

C#
public string OnChange { get; set; }

The name of the JavaScript function that will handle the collapse event. Fires when an event is going to be collapsed.

C#
public string OnCollapse { get; set; }

The name of the JavaScript function that will handle the dataBound event. Fires when the Timeline is bound to data.

C#
public string OnDataBound { get; set; }

The name of the JavaScript function that will handle the expand event. Fires when an event is going to be expanded.

C#
public string OnExpand { get; set; }

The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Timeline is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public string OnKendoKeydown { get; set; }

The name of the JavaScript function that will handle the navigate event. Fires when the left or right arrow is clicked.

C#
public string OnNavigate { get; set; }

Defines the orientation of the Timeline widget

C#
public TimelineOrientation? Orientation { get; set; }

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

C#
public bool? ShowDateLabels { get; set; }

Represents a collection of templates defined for the component.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)