New to Telerik UI for Blazor? Download free 30-day trial

TileLayout Reorder

You can rearrange the tiles in the tile layout by a simple drag-and-drop of their headers to adjust the dashboard positions to your liking.

To enable reordering, set the Reorderable parameter of the main TelerikTileLayout tag to true.

To be able to drag and reorder a tile, it must have some content in its header.

Resizing and reordering tiles makes them snap to the dimensions of the rows and columns of the main element, and their size determines how they render - they are rendered in the first available slot that accommodates their current size, and then the next tile is rendered in the next available slot. This means that large tiles can leave small gaps that will not be filled in by tiles that do not come immediately after them, even if they are sufficiently small to fit in those gaps, and that dragging a large tile into a slot where there is no room might not be possible. Whether a tile will move before another tile is determined by the mouse cursor position relative to the static tile, not by the overall dimensions and position of the dragged tile - if the mouse cursor is to the left of the vertical middle, the dragged tile will go before the static tile and if the mouse cursor is on the right of the vertical middle, the dragged tile will go after the static tile.

Reordering a tile fires the OnReorder event.

Reordering tiles in the TileLayout

reorder tiles

<TelerikTileLayout ColumnWidth="200px"
        <TileLayoutItem HeaderText="Panel 1">
            <Content>Regular sized first panel.</Content>
        <TileLayoutItem HeaderText="Panel 2">
            <Content>You can put components in the tiles too.</Content>
        <TileLayoutItem HeaderText="Panel 3" RowSpan="2">
            <Content>This tile is two rows tall.</Content>
        <TileLayoutItem HeaderText="Panel 4" RowSpan="2" ColSpan="2">
            <Content>This tile is two rows tall and two columns wide</Content>

When the tile layout has reordering enabled, it captures mouse events in its header. Thus, if you put components in the HeaderTemplate of TileLayoutItem instances, they may not function as expected. For example, you may not be able to focus inputs with the mouse. The header is designed for presentation purposes and to allow dragging, and we recommend you consider putting editors or complex content in the Content of the tiles.

See Also

In this article