New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

How to set height to RadListView and make it responsive


In this KB article you will learn how to set the RadListView Height. This would allow you to define a responsive layout or to let it fill its container height to 100%.


  1. Define a container for the items with the desired settings inside the LayoutTemplate, because RadListView does not render a wrapping element for its items:
<div class="contentContainer">
    <telerik:RadListView ItemPlaceholderID="Placeholder1" ID="RadListView" RenderMode="Lightweight" runat="server" OnNeedDataSource="RadListView1_NeedDataSource">
            <div style="height: 100%; background: yellow; overflow: auto;" id="listViewLayout">
                <asp:PlaceHolder runat="server" ID="Placeholder1" />
            <div style="margin: 5px 0px 8px 0px; border: 1px solid black;">
                <%# Eval("ID") %>
  1. Add some styling to match your needs. This will make the ListView be 50% of the page:
    html, body, form {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;

    .contentContainer {
        width: 50%;
        height: 50%;
  1. Add some dummy data in the control:
protected void RadListView1_NeedDataSource(object sender, RadListViewNeedDataSourceEventArgs e)
    (sender as RadListView).DataSource = GetGridSource();
private DataTable GetGridSource()
    DataTable dataTable = new DataTable();

    DataColumn column = new DataColumn();
    column.DataType = Type.GetType("System.Int32");
    column.ColumnName = "ID";

    for (int i = 0; i <= 100; i++)
        DataRow row = dataTable.NewRow();
        row["ID"] = i + 1;


    return dataTable;
Protected Sub RadListView1_NeedDataSource(ByVal sender As Object, ByVal e As RadListViewNeedDataSourceEventArgs)
    (TryCast(sender, RadListView)).DataSource = GetGridSource()
End Sub

Private Function GetGridSource() As DataTable
    Dim dataTable As DataTable = New DataTable()
    Dim column As DataColumn = New DataColumn()
    column.DataType = Type.[GetType]("System.Int32")
    column.ColumnName = "ID"

    For i As Integer = 0 To 100
        Dim row As DataRow = dataTable.NewRow()
        row("ID") = i + 1

    Return dataTable
End Function
In this article
Not finding the help you need? Improve this article