Reputation: 27
Hello help me I need DataList with limited number of rows .. with out using RepeatColumns properties so I need just one column in the DataList with limited number of Rows
Upvotes: 0
Views: 281
Reputation: 225
Use repeat columns for row count, like this in the datalist:
RepeatColumns = "5"
Upvotes: 1
Reputation: 7539
You can use [enter link description here][Enumerable.Take] on your DataSource and "Take" the number of rows you need.
Example from MSDN:
int[] grades = { 59, 82, 70, 56, 92, 98, 85 };
IEnumerable<int> topThreeGrades =
grades.OrderByDescending(grade => grade).Take(3);
Upvotes: 0