special requirements with repeater

Z

z. f.

Hi,

i am using repeater to implements a page of products.
the products list look should be 5 products in a row.
between each row i need to put special HTML for the start and end of each row.

what is the best way to implement this?
should i use 2 repeaters - one for rows and one for columns?

if i just use the <ItemTermplate> for a single item (which i need to have 5 in a row)
how do i change the rows in the resulting table?

i need to "know" if this is the first item for a row(index 0, 5, 10 etc)
and paint special HTML for row start
and the same for the left item in a row (4, 9, 14 etc)
in order to paint the row finish HTML.

please advise.

TIA, z.
 
E

Eliyahu Goldin

You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

Hi,

i am using repeater to implements a page of products.
the products list look should be 5 products in a row.
between each row i need to put special HTML for the start and end of each row.

what is the best way to implement this?
should i use 2 repeaters - one for rows and one for columns?

if i just use the <ItemTermplate> for a single item (which i need to have 5 in a row)
how do i change the rows in the resulting table?

i need to "know" if this is the first item for a row(index 0, 5, 10 etc)
and paint special HTML for row start
and the same for the left item in a row (4, 9, 14 etc)
in order to paint the row finish HTML.

please advise.

TIA, z.
 
Z

z. f.

is there a way to have a server side <% if bBool then %> statement inside an ItemTemplate of a repeater control that will occur in the databinding event and not in the pre-render event, so it will recognize the container object?

You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

Hi,

i am using repeater to implements a page of products.
the products list look should be 5 products in a row.
between each row i need to put special HTML for the start and end of each row.

what is the best way to implement this?
should i use 2 repeaters - one for rows and one for columns?

if i just use the <ItemTermplate> for a single item (which i need to have 5 in a row)
how do i change the rows in the resulting table?

i need to "know" if this is the first item for a row(index 0, 5, 10 etc)
and paint special HTML for row start
and the same for the left item in a row (4, 9, 14 etc)
in order to paint the row finish HTML.

please advise.

TIA, z.
 
E

Eliyahu Goldin

You can either use ItemDataBound event or make a method or property that will implement your logic and databind to that method or property.

Eliyahu

is there a way to have a server side <% if bBool then %> statement inside an ItemTemplate of a repeater control that will occur in the databinding event and not in the pre-render event, so it will recognize the container object?

You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

Hi,

i am using repeater to implements a page of products.
the products list look should be 5 products in a row.
between each row i need to put special HTML for the start and end of each row.

what is the best way to implement this?
should i use 2 repeaters - one for rows and one for columns?

if i just use the <ItemTermplate> for a single item (which i need to have 5 in a row)
how do i change the rows in the resulting table?

i need to "know" if this is the first item for a row(index 0, 5, 10 etc)
and paint special HTML for row start
and the same for the left item in a row (4, 9, 14 etc)
in order to paint the row finish HTML.

please advise.

TIA, z.
 
D

David Jessee

in VB.Net
<%# IIF(expr, true, false) %>
in C#
<%# expr?true:false %>

is there a way to have a server side <% if bBool then %> statement inside an ItemTemplate of a repeater control that will occur in the databinding event and not in the pre-render event, so it will recognize the container object?

You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

Hi,

i am using repeater to implements a page of products.
the products list look should be 5 products in a row.
between each row i need to put special HTML for the start and end of each row.

what is the best way to implement this?
should i use 2 repeaters - one for rows and one for columns?

if i just use the <ItemTermplate> for a single item (which i need to have 5 in a row)
how do i change the rows in the resulting table?

i need to "know" if this is the first item for a row(index 0, 5, 10 etc)
and paint special HTML for row start
and the same for the left item in a row (4, 9, 14 etc)
in order to paint the row finish HTML.

please advise.

TIA, z.
 

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,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top