How To Constrain Row Size of RadListView and RadDataPager

3 posts, 1 answers
  1. Andy
    Andy avatar
    18 posts
    Member since:
    Apr 2011

    Posted 16 Sep 2011 Link to this post

    I have successfully built a page with a RadListView and RadDataPager.  I have set the PageSize on the RadDataPager to 6 and that works fine: there are six items displayed.  However the RadListView displays 4 items per row and I would like to constrain it to displaying 3 items per row.
    I have tried using width as a constraint on the RadListView and the containing DIV by setting Width and Max-Width in CSS so that only 3 items fit but to no avail.

    So how does one limit the number of items displayed in the RadListView to a specific number?

  2. Answer
    Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 22 Sep 2011 Link to this post

    Hello Andy,

    The are two options to accomplish this. First approach is to define strict width for the ItemTemplate and the LayoutTemplate so exactly three items fit in the width of the RadListView. This technique is used here
    Another approach is to implement grouping where you can specify the number of items in a group. See this demo.

    Iana Tsolova
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy
    Andy avatar
    18 posts
    Member since:
    Apr 2011

    Posted 17 Oct 2011 Link to this post

    Thank you!
Back to Top