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

Templates

The PanelBar for ASP.NET Core supports templates for customizing the appearance of its items.

To customize look and feel of the PanelBar use the Template() or TemplateId() configuration options to set a template that will be used for the rendering the PanelBar's items.

The following example demonstrates how to use the TemplateId() configuration:

    <script id="template" type="text/kendo-ui-template">
        # if (!item.items) { #
            #: item.text #
        # } else { #
            <b> #: item.text # </b> 
        # } #
    </script>

    @(Html.Kendo().PanelBar()
        .Name("panelbar")
        .TemplateId("template")
        .DataSource(source =>
        {
            source.Read(read => read.Action("Read_TemplateData", "PanelBar"));
        })
    )
    <script id="template" type="text/kendo-ui-template">
        # if (!item.items) { #
            #: item.text #
        # } else { #
            <b> #: item.text # </b> 
        # } #
    </script>

    <kendo-panelbar name="panelbar" template-id="template">
        <hierarchical-datasource>
            <transport>
                <read url="@Url.Action("Read_TemplateData", "PanelBar")" />
            </transport>
        </hierarchical-datasource>
    </kendo-panelbar>

See Also

In this article