I have a requirement to have fixed number of rows (ie 10 rows) in a Repeater, with 2 columns. For example, I have a list of 15 items ie) (Item 1, Item 2, ...Item 16) . The repeater must present the data like below:

The first column must be filled up with 10 items before starting to fill the second one.

Please provide suggestions.

Required Output Format: Output format image

 <pre>
<table>    
<tr><td>Item 1</td> <td>Item 11</td></tr>
<tr><td>Item 2</td> <td>Item 12</td></tr>
<tr><td>Item 3</td> <td>Item 13</td></tr>
<tr><td>Item 4</td> <td>Item 14</td></tr>
<tr><td>Item 5</td> <td>Item 15</td></tr>
<tr><td>Item 6</td> <td></td></tr>
<tr><td>Item 7</td> <td></td></tr>
<tr><td>Item 8</td> <td></td></tr>
<tr><td>Item 9</td> <td></td></tr>
<tr><td>Item 10</td> <td></td></tr>
</table>
</pre>

So far , I have this

Attaching code screenshot because of error while posting code....

Please see attached screenshot of the code I currently have

Suggestions also welcome on how to do this using a DataList or other data controls.

Related posts

Recent Viewed