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

Model Binding

The Telerik UI TabStrip enables you to bind it to a hierarchical model.

  1. Make sure you followed all the steps from the introductory article on Telerik UI for ASP.NET MVC.
  2. Create a new action method and pass the Categories table as the model.

    public ActionResult Index()
    {
        NorthwindDataContext northwind = new NorthwindDataContext();
    
        return View(northwind.Categories);
    }
    
  3. Make your view strongly typed.

        @model IEnumerable<MvcApplication1.Models.Category>
    
  4. Add a TabStrip.

        @(Html.Kendo().TabStrip()
            .Name("tabstrip") // The name of the TabStrip is mandatory. It specifies the "id" attribute of the TabStrip.
            .BindTo(Model,(item,category)  =>
            {
                item.Text = category.CategoryName;
            })
        )
    

See Also

In this article