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

Kendo UI OrgChart TagHelper OrgChartTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[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: IDataBoundWidget<OrgChartDataSourceTagHelper>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-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>

Constructors

Initializes a new instance of the OrgChartTagHelper class.

C#
public OrgChartTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

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.

C#
public string[] CardsColors { get; set; }

The Id of the data source.

C#
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.

C#
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).

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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.

C#
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).

C#
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.

C#
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.

C#
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.

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 OrgChart 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 save event. Triggered when the user attempts to save the current changes on the edited node. Preventable.

C#
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.

C#
public string OnSelect { get; set; }

Defines a node card template.

C#
public string Template { get; set; }

Defines a node card template. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

Defines a node card template. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Represents a collection of templates defined for the component.

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

Implements: ITemplateComponent.Templates

Defines a node card template. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

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)