This example shows how to bind Telerik TabStrip for ASP.NET MVC to a collection of objects.
The required steps are:
public ActionResult DataBindingToModel()
{
ViewData["tabStripData"] = NavigationDataBuilder.GetCollection();
return View();
}
<%= Html.Telerik().TabStrip()
.Name("TabStrip")
.BindTo((IEnumerable<NavigationData>)ViewData["tabStripData"],
(item, navigationData) =>
{
item.Text = navigationData.Text;
item.ImageUrl = navigationData.ImageUrl;
item.Url = navigationData.NavigateUrl;
})
%>
You can prevent the normal behavior of the link (navigating to the specified url), with e.preventDefault(); method. The same approach is used in this example.