New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Responsive Columns

Updated on Oct 27, 2026

The Telerik UI for ASP.NET MVC Grid includes built-in options that show or hide columns based on the viewport width.

For a runnable example, refer to the demo on Responsive Columns for the Grid component.

Configuration

Set the Media() configuration method of the column to a supported value. When the media query matches, the column stays visible.

Razor
    @(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.Customer>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(c => c.ContactName).Media("(min-width: 450px)");
                columns.Bound(c => c.ContactTitle).Width(250).Media("(min-width: 850px)");
                columns.Bound(c => c.CompanyName).Width(250).Media("(min-width: 850px)");
                columns.Bound(c => c.Country).Media("(min-width: 450px)");
            })
            .HtmlAttributes(new { style = "height: 550px;" })
            .Scrollable()
            .Groupable()
            .Sortable()
            .Pageable(pageable => pageable
                .Refresh(true)
                .PageSizes(true)
                .ButtonCount(5))
            .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("Responsive_Columns_Customers_Read", "Grid"))
                .PageSize(20)
            )
    )

Accepted Values

  1. Use a valid media query string for the matchMedia browser API. The Grid toggles column visibility based on the query result.

  2. Use one of the device identifiers available in Bootstrap 5:

  • xs is equivalent to "(max-width: 576px)"
  • sm is equivalent to "(min-width: 576px)"
  • md is equivalent to "(min-width: 768px)"
  • lg is equivalent to "(min-width: 992px)"
  • xl is equivalent to "(min-width: 1200px)"

Column Template

Responsive Columns work with Column Templates to render multiple field values in a single compact layout.

The content in the Template() method is displayed when the Media() condition is met. For example, the following template column appears when the viewport is up to 450px wide.

Razor
@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.Customer>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(c => c.ContactName).Media("(min-width: 450px)");
            columns.Bound(c => c.ContactTitle).Width(250).Media("(min-width: 850px)");
            columns.Bound(c => c.CompanyName).Width(250).Media("(min-width: 850px)");
            columns.Bound(c => c.Country).Media("(min-width: 450px)");
            columns.Template("#=resColTemplate(data)#").Title("Items").Media("(max-width: 450px)");
        })
        .HtmlAttributes(new { style = "height: 550px;" })
        .Scrollable()
        .Groupable()
        .Sortable()
        .Pageable(pageable => pageable
            .Refresh(true)
            .PageSizes(true)
            .ButtonCount(5))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read.Action("Responsive_Columns_Customers_Read", "Grid"))
            .PageSize(20)
        )
)

See Also