OrgChartTagHelper
Kendo UI OrgChart TagHelper OrgChartTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-orgchart")]
[RestrictChildren("editable", new string[] { "messages", "orgchart-datasource", "group-header-template", "node-template" })]
public class OrgChartTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<OrgChartDataSourceTagHelper>, ITemplateComponent
Inheritance: objectTagHelperTagHelperBaseOrgChartTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-orgchart name="orgchart">
<orgchart-datasource type="DataSourceTagHelperType.Ajax">
<transport>
<read url="@Url.Action("Read","OrgChart")" />
</transport>
<schema>
<orgchart-model id="ID"
parent-id="ParentID"
expanded="true"
name="Name"
title="Title"
avatar="Avatar">
<fields>
<field name="ParentID" nullable="true"></field>
<field name="ID" type="number"></field>
<field name="Name" type="string"></field>
<field name="Title" type="string"></field>
<field name="Avatar" type="string"></field>
</fields>
</orgchart-model>
</schema>
</orgchart-datasource>
</kendo-orgchart>
Child Tags
Constructors
Initializes a new instance of the OrgChartTagHelper class.
Properties
An array of strings defining the cards top-border color for each level starting from the top level. If not set, the colors from the Kendo Chart series will be used.
public string[] CardsColors { get; set; }
The Id of the data source.
public string DatasourceId { get; set; }
Specifies the field the nodes should be grouped by. If any value is passed, the OrgChart uses its grouping rendering mode.
public string GroupField { get; set; }
Provides an option to customize the default template for the group label (using the field value and name by default).
public string GroupHeaderTemplate { get; set; }
Provides an option to customize the default template for the group label (using the field value and name by default). This option expects the name of a JavaScript function that will be called to return the template.
public string GroupHeaderTemplateHandler { get; set; }
Provides an option to customize the default template for the group label (using the field value and name by default). This option expects the ID of the script element that contains the template.
public string GroupHeaderTemplateId { get; set; }
Provides an option to customize the default template for the group label (using the field value and name by default). This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent GroupHeaderTemplateView { get; set; }
The name of the JavaScript function that will handle the cancel event. Triggered when the user is about to cancel the changes for the currently edited node. Preventable.
public string OnCancel { get; set; }
The name of the JavaScript function that will handle the change event. Triggered when the selected node has been changed upon user interaction.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the collapse event. Triggered before a node has been collapsed upon user interaction. Preventable.
public string OnCollapse { get; set; }
The name of the JavaScript function that will handle the create event. Triggered when a node is about to be created upon user interaction. Preventable.
public string OnCreate { get; set; }
The name of the JavaScript function that will handle the dataBinding event. Triggered before the actual change in the dataSource occurs. Preventable.
public string OnDataBinding { get; set; }
The name of the JavaScript function that will handle the dataBound event. Triggered after the dataSource change event has been processed (adding/removing/loading/editing items).
public string OnDataBound { get; set; }
The name of the JavaScript function that will handle the delete event. Triggered when a node is about to be deleted as of a consequence of user interaction. Preventable.
public string OnDelete { get; set; }
The name of the JavaScript function that will handle the edit event. Triggered when a node is about to enter edit mode upon user interaction. Preventable.
public string OnEdit { get; set; }
The name of the JavaScript function that will handle the expand event. Triggered before a node has been expanded upon user interaction. Preventable.
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 OrgChart is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the save event. Triggered when the user attempts to save the current changes on the edited node. Preventable.
public string OnSave { get; set; }
The name of the JavaScript function that will handle the select event. Triggered when the user attempts to select a new node or group of nodes (in grouped scenario). Preventable.
public string OnSelect { get; set; }
Defines a node card template. This option expects the name of a JavaScript function that will be called to return the template.
public string TemplateHandler { get; set; }
Defines a node card template. This option expects the ID of the script element that contains the template.
public string TemplateId { get; set; }
Represents a collection of templates defined for the component.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
Defines a node card template. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent TemplateView { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: