Telerik blogs

We have just released the first service pack for Telerik Extensions for ASP.NET MVC. Here are the most important changes:

  1. The Grid<T>(T item) method has been removed (for good). This means you can no longer use the following syntax:
    Html.Telerik.Grid(new { Text="", Age=0})
    .Columns(columns =>
    {
    columns.Add(o => o.Text);
    columns.Add(o => o.Age);
    })
    The reason is that this prevented type inference in some regularly used cases – the C# compiler preferred that method instead of Grid<T>(IEnumerable<T> dataSource). This forum thread shows how to implement the same capability using extension method. Feel free to use this if binding to anonymous type is required.
  2. Hierarchical databinding for the panelbar and menu has been implemented. Check out the code (assuming Category –> Products object hierarchy):
    Html.Telerik().PanelBar()
    .Name("PanelBar")
    .BindTo(Model, mappings =>
    {
    mappings.For<Category>(binding => binding
    .ItemDataBound((item, category) =>
    {
    item.Text = category.CategoryName;
    })
    .Children(category => category.Products));
    mappings.For<Product>(binding => binding
    .ItemDataBound((item, product) =>
    {
    item.Text = product.ProductName;
    }));
    })

  3. Windows7 theme has been implemented for all components:
    windows7
  4. Implemented LinkHtmlAttributes for panelbar, tabstrip. You can set the target for example:
    Html.Telerik().Menu()
    .Name("Menu")
    .Items(items =>
    {
    items.Add().Text("Example")
    .Url("http://www.example.com")
    .LinkHtmlAttributes(new {target="_blank"});
    })


  5. LoadContentFrom now supports route values (panelbar and tabstrip):
    Html.Telerik().TabStrip()
    .Name("TabStrip")
    .Items(items =>
    {
    items.Add().Text("Test").LoadContentFrom("Ajax", "Home", new {id=42});
    })

  6. Various fixes and performance improvements

About the Author

Atanas Korchev

 is Team Leader in Kendo UI Team

Comments

Comments are disabled in preview mode.