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

TabStripBuilder

Defines the fluent interface for configuring the TabStrip component.

Methods

Items(System.Action)

Defines the items in the tabstrip

Parameters

addAction - System.Action<TabStripItemFactory>

The add action.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item");
                            items.Add().Text("Second Item");
                        })
            )

Events(System.Action)

Configures the client-side events.

Parameters

clientEventsAction - System.Action<TabStripEventBuilder>

The client events action.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Events(events =>
                            events.Select("onSelect").OnLoad("onLoad")
                        )
            )

Collapsible(System.Boolean)

Configures the collapsible property of the tabstrip.

Parameters

enable - System.Boolean

Whether the component animation is collapsible.

Example


            @( Html.Kendo().TabStrip()
                        .Name("PanelBar")
                        .Collapsible(false)
            )            

Animation(System.Boolean)

Configures the animation effects of the tabstrip.

Parameters

enable - System.Boolean

Whether the component animation is enabled.

Example


            @( Html.Kendo().TabStrip()
                        .Name("PanelBar")
                        .Animation(false)
            )            

Animation(System.Action)

Configures the animation effects of the tabstrip.

Parameters

animationAction - System.Action<PopupAnimationBuilder>

The action that configures the animation.

Example


            @( Html.Kendo().TabStrip()
                        .Name("PanelBar")
                        .Animation(animation => animation.Open(config => config.Fade(FadeDirection.In)))
            )

BindTo(System.String,System.Action)

Binds the tabstrip to a sitemap

Parameters

viewDataKey - System.String

The view data key.

siteMapAction - System.Action<TabStripItem,SiteMapNode>

The action to configure the item.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .BindTo("examples", (item, siteMapNode) =>
                        {
                        })
            )

BindTo(System.String)

Binds the tabstrip to a sitemap.

Parameters

viewDataKey - System.String

The view data key.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .BindTo("examples")
            )

BindTo(System.Collections.Generic.IEnumerable,System.Action)

Binds the tabstrip to a list of objects

Parameters

dataSource - System.Collections.Generic.IEnumerable<T>

The data source.

itemDataBound - System.Action<TabStripItem,T>

The action executed for every data bound item.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .BindTo(new []{"First", "Second"}, (item, value) =>
                        {
                           item.Text = value;
                        })
            )

SelectedIndex(System.Int32)

Selects the item at the specified index.

Parameters

index - System.Int32

The index.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item");
                            items.Add().Text("Second Item");
                        })
                        .SelectedIndex(1)
            )

ItemAction(System.Action)

Callback for each item.

Parameters

action - System.Action<TabStripItem>

Action, which will be executed for each item.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .ItemAction(item =>
                        {
                            item
                                .Text(...)
                                .HtmlAttributes(...);
                        })
            )

HighlightPath(System.Boolean)

Select item depending on the current URL.

Parameters

value - System.Boolean

If true the item will be highlighted.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .HighlightPath(true)
            )

Enable/disable TabStrip keyboard navigation.

Parameters

value - System.Boolean

If true the TabStrip will have keyboard navigation.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Navigatable(false)
            )

SecurityTrimming(System.Boolean)

Enable/disable security trimming functionality of the component.

Parameters

value - System.Boolean

If true security trimming is enabled.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .SecurityTrimming(false)
            )

TabPosition(Kendo.Mvc.UI.TabStripTabPosition)

Sets the tabs' position. The default value is Top. Using fade animation is highly recommended with any of the non-default tab position settings.

Parameters

position - TabStripTabPosition

The position.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item");
                            items.Add().Text("Second Item");
                        })
                        .TabPosition(TabPosition.Left)
            )

Scrollable(System.Action)

Sets the tab scrolling settings.

Parameters

scrollableSettingsAction - System.Action<TabStripScrollableSettingsBuilder>

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item");
                            items.Add().Text("Second Item");
                        })
                        .Scrollable(s => s.Enabled(true).Distance(300))
            )

Scrollable(System.Boolean)

Disables tab scrolling.

Parameters

enabled - System.Boolean

Boolean flag.

Example


             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item");
                            items.Add().Text("Second Item");
                        })
                        .Scrollable(false)
            )

Value(System.String)

Sets the selected tab of the widget

Parameters

value - System.String

String value corresponding to DataTextField property

ToComponent()

Returns the internal view component.

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name of the component.

Example


            @(Html.Kendo().Grid<OrderViewModel>()
               .Name("grid")
               .Columns(columns =>
               {
                   columns.Bound(p => p.OrderID).Filterable(false);
                   columns.Bound(p => p.Freight);  
               })
               .DataSource(dataSource => dataSource
                   .Ajax()
                   .PageSize(20)
                   .Read(read => read.Action("Orders_Read", "Grid"))
               )
            )

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean)

Parameters

deferred - System.Boolean

ModelMetadata(System.Web.Mvc.ModelMetadata)

Uses the Metadata of the Model.

Parameters

modelMetadata - System.Web.Mvc.ModelMetadata

The metadata set for the Model

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

Render()

Renders the component.

Example


            @(@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Product>>" )
            @( Html.Kendo().Grid(Model)
                .Name("grid")
                .DetailTemplate(product => {
                    )
                       Product Details:
                       <div>Product Name: @( product.ProductName )</div>
                       <div>Units In Stock: @( product.UnitsInStock )</div>
                    @(
                })
                .Render();
            )

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?