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

TabStripBuilder

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 of the TabStrip.

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 of the TabStrip.

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 TabStrip.

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>

The action which accepts scrollable settings.

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)
            )

Sortable(System.Boolean)

If enabled, users will be able to sort the tabs by dragging them to the desired position.

Parameters

value - System.Boolean

The value for Sortable

Example


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

Sortable()

If enabled, users will be able to sort the tabs by dragging them to the desired position.

Example


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

Value(System.String)

Sets the selected tab of the widget

Parameters

value - System.String

String value corresponding to DataTextField property

Example


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

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

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>

AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

Parameters

value - System.Boolean

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();
            )

ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

attributes - System.Object

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

Parameters

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

The JavaScript attributes.

overrideAttributes - System.Boolean

Argument which determines whether attributes should be overriden.

ToHtmlString()

ToClientTemplate()

In this article
Not finding the help you need?