Reputation: 1950
For an example of what I'm attempting to accomplish, see below. I need to loop through a data source, displaying a value from every datarow in its own tablecell. (table is 3 columns wide)
Normally I'd use a modulus in the code behind to determine if a table row should be ended and a new row started. But I swear I recall reading that the Repeater control has this capability built in.
Pseudocode/table:
Header: <table>
<tr><td>Bind("ProductID")</td><td>Bind("ProductID")</td><td>Bind("ProductID")</td></tr>
Footer: </table>
A simple example of the output is:
1 2 3
4 5 6
7 8 9
So what I'm wondering is there a "built in" way to accomplish this, or should I proceed with a mod check in the code behind.
Thanks Kevin
Upvotes: 1
Views: 132
Reputation: 9020
The Repeater does not have it the ListView however does.
Edit I was actually thinking of the DataList (new name for the "old" ListView") as Canavar mentions, but the new ListView is so flexible I'd bet you can use it as well.
Upvotes: 2