TileLayout Resizing

The Telerik UI TileLayout HtmlHelper for ASP.NET MVC allows you resize the containers by snapping to the available columns and row units. When enabled the user is able to alter the width or the height of а current item.

The resizing takes advantage of the CSS Grid mechanism, meaning that the widget increases how the element spans and the browser takes care of how to re-arrange the items if necessary.

Enabling the resizable feature of the TileLayout

To enable the resizable feature of the TileLayout, set the Resizable() method and pass true as a parameter.

The example below will render a grid with two rows and two columns which can be resized both vertically and horizontally.

     @(Html.Kendo().TileLayout()
        .Name("tilelayout")
        .Columns(3)
        .Containers(c => {
            c.Add().Header(h => h.Text("Item one")).BodyTemplate("Item one body").ColSpan(1).RowSpan(1);
            c.Add().Header(h => h.Text("Item two")).BodyTemplate("Item two body").ColSpan(1).RowSpan(1);
        })
        .Resizable(true)
    )

Event Handling

The widget triggers a Resize() event which provides access to the resized container.

    .Events(e=>e.Resize("onResize"))
    resize: function (e) {
        console.log(e.container.find(".k-card-header").text());
    }

See Also

In this article
Not finding the help you need? Improve this article