Model Binding
The Telerik UI TabStrip enables you to bind it to a hierarchical model.
- Make sure you followed all the steps from the introductory article on Telerik UI for ASP.NET MVC.
-
Create a new action method and pass the Categories table as the model.
public ActionResult Index() { NorthwindDataContext northwind = new NorthwindDataContext(); return View(northwind.Categories); }
-
Make your view strongly typed.
@model IEnumerable<MvcApplication1.Models.Category>
-
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; }) )