This is a migrated thread and some comments may be shown as answers.

How To Constrain Row Size of RadListView and RadDataPager

2 Answers 184 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 2
Andy asked on 16 Sep 2011, 07:23 PM
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?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 22 Sep 2011, 08:18 AM
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.

Greetings,
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
0
Andy
Top achievements
Rank 2
answered on 17 Oct 2011, 03:37 PM
Thank you!
Tags
DataPager
Asked by
Andy
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Andy
Top achievements
Rank 2
Share this question
or