By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,096 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

special requirements with repeater

P: n/a
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.

Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


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

Eliyahu

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message news:eI****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 19 '05 #2

P: n/a
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?

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message news:Ol**************@TK2MSFTNGP11.phx.gbl...
You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message news:eI****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 19 '05 #3

P: n/a
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

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message news:uY****************@TK2MSFTNGP09.phx.gbl...
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?

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message news:Ol**************@TK2MSFTNGP11.phx.gbl...
You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message news:eI****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 19 '05 #4

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

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message news:uY****************@TK2MSFTNGP09.phx.gbl...
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?

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message news:Ol**************@TK2MSFTNGP11.phx.gbl...
You should rather user DataList. It allows you to arrange several items in a row.

Eliyahu

"z. f." <zi**@info-scopeREMSPAM.co.il> wrote in message news:eI****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.