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

Kendo UI PanelBar TagHelper PanelBarTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-panelbar")]
[RestrictChildren("animation", new string[] { "messages", "items", "hierarchical-datasource", "li" })]
[OutputElementHint("ul")]
public class PanelBarTagHelper : ItemsCollectionTagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<HierarchicalDataSourceTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseItemsCollectionTagHelperBasePanelBarTagHelper

Implements: IDataBoundWidget<HierarchicalDataSourceTagHelper>ITagHelperITagHelperComponentITemplateComponent

Inherited Members ItemsCollectionTagHelperBase.DataSourceIdItemsCollectionTagHelperBase.DatasourceItemsCollectionTagHelperBase.AnimationTagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()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-panelbar name="panelbar" expand-mode="single">
       <items>
           <panelbar-item text="Projects">
               <items>
                   <panelbar-item text="New Business Plan"></panelbar-item>
                   <panelbar-item text="Sales Forecasts">
                       <items>
                           <panelbar-item text="Q1 Forecast"></panelbar-item>
                           <panelbar-item text="Q2 Forecast"></panelbar-item>
                           <panelbar-item text="Q3 Forecast"></panelbar-item>
                           <panelbar-item text="Q4 Forecast"></panelbar-item>
                       </items>
                   </panelbar-item>
                   <panelbar-item text="Sales Reports"></panelbar-item>
               </items>
           </panelbar-item>
           <panelbar-item text="Programs">
               <items>
                   <panelbar-item text="Monday"></panelbar-item>
                   <panelbar-item text="Tuesday"></panelbar-item>
                   <panelbar-item text="Wednesday"></panelbar-item>
                   <panelbar-item text="Thursday"></panelbar-item>
                   <panelbar-item text="Friday"></panelbar-item>
               </items>
           </panelbar-item>
           <panelbar-item text="Communication" enabled="false"></panelbar-item>
       </items>
   </kendo-panelbar>

Constructors

Initializes a new instance of the PanelBarTagHelper class.

C#
public PanelBarTagHelper(IKendoHtmlGenerator generator, IIconBuilder iconBuilder)
Parameters:generatorIKendoHtmlGeneratoriconBuilderIIconBuilder

Properties

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

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

Binds a list of items to the PanelBar.

C#
[HtmlAttributeName("bind-to")]
public IEnumerable<PanelBarItemBase> BindTo { get; set; }

Sets the field of the data item that provides the custom class for the icon element of the PanelBar nodes.

C#
[HtmlAttributeName("dataiconclassfield")]
public string DataIconClassField { get; set; }

Sets the field of the data item that provides the icon name of the PanelBar nodes.

C#
[HtmlAttributeName("dataiconfield")]
public string DataIconField { get; set; }

Sets the field of the data item that provides the image URL of the PanelBar nodes.

C#
[HtmlAttributeName("dataimageurlfield")]
public string DataImageUrlField { get; set; }

Sets the field of the data item that provides the sprite CSS class of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

C#
[HtmlAttributeName("dataspritecssclassfield")]
public string DataSpriteCssClassField { get; set; }

Sets the field of the data item that provides the text content of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

C#
[HtmlAttributeName("datatextfield")]
public string DataTextField { get; set; }

Sets the field of the data item that provides the link URL of the nodes.

C#
[HtmlAttributeName("dataurlfield")]
public string DataUrlField { get; set; }

Specifies how the PanelBar items are displayed when opened and closed. The following values are available:

C#
public string ExpandMode { get; set; }

Indicates whether the child DataSources should be fetched lazily when parent groups get expanded. Setting this to false causes all child DataSources to be loaded at initialization time.

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

The name of the JavaScript function that will handle the activate event. Triggered when an item of a PanelBar is activated.

C#
public string OnActivate { get; set; }

The name of the JavaScript function that will handle the collapse event. Triggered when an item of a PanelBar is collapsed.

C#
public string OnCollapse { get; set; }

The name of the JavaScript function that will handle the contentLoad event. Fires when content is fetched from an AJAX request.

C#
public string OnContentLoad { 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 items);

C#
public string OnDataBound { get; set; }

The name of the JavaScript function that will handle the error event. Fires when AJAX request results in an error.

C#
public string OnError { get; set; }

The name of the JavaScript function that will handle the expand event. Triggered when an item of a PanelBar is 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 PanelBar 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 select event. Triggered when an item of a PanelBar is selected by the user.

C#
public string OnSelect { get; set; }

Template for rendering each node.

C#
public string Template { get; set; }

Template for rendering each node. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

Template for rendering each node. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Configures the templates for the PanelBar.

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

Implements: ITemplateComponent.Templates

Template for rendering each node. 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: ItemsCollectionTagHelperBase.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: ItemsCollectionTagHelperBase.SerializeEvents()

SerializeSettings method.

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

Dictionary<string, object>

Overrides: ItemsCollectionTagHelperBase.SerializeSettings()

Serializes the defined templates.

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

Dictionary<string, object>

Overrides: TagHelperBase.SerializeTemplates()

Writes the HTML output.

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

The TagHelper output.

Overrides: ItemsCollectionTagHelperBase.WriteHtml(TagHelperOutput)