Repeater

G

Galadriel

is it possible to get the repeater control to display items across a page

i realise that i can use table cells to get it to repeat across but that would just repeat in one row on and on
<table><tr><itemtemplate><td>index=index+

</td


if index=mod(count of items rendered / 3.... etc et

</tr><tr

end i

</itemtemplate></tr

the above would be the old way of doing it with recordset

looking to end up with a structure like this

item1 item2 item3
item4 item5 item6
item7 item8 item9

so i know its now got to be completed by using the code behind

Private Sub Repeater2_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles Repeater2.ItemDataBoun

If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem The


somthing in here that knows the count of rows already rendered and is able to output a string to the end of the html for every third ro

end i

........

is this possible?

or can you movenext in a repeater control on the html and have a template that does three rows before moving on to the next row (ie like old recordsets)?
 
G

Galadriel

oops think i've just solved the proble

a literal control placed at the right point in the repeater control

by using this in the databind i can place content in the literal every third row

if mod(e.Item.ItemIndex/3 = 0 then

find the literal control and set its text to </tr><tr>

else

set it to ""

end if

i think
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top