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

How do I change the BackColor of a Repeater?

P: n/a
jm
I have a repeater and based upon some database results want to change
the backcolor or font color of the row at my databind statement.

I have done this before with a datagrid:

e.Item.BackColor = System.Drawing.Color.Red

But this is unavailable with the repeater. Do I have to change to a
DataGrid for this functionality? Thank you.
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
repeater spits out html, you'll have to render it to SOME type of control
that allows coloring of the background

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
I have a repeater and based upon some database results want to change
the backcolor or font color of the row at my databind statement.

I have done this before with a datagrid:

e.Item.BackColor = System.Drawing.Color.Red

But this is unavailable with the repeater. Do I have to change to a
DataGrid for this functionality? Thank you.

Nov 18 '05 #2

P: n/a
I suggest you use a table in your Repeater. Put the opening <TABLE> in the
headertemplate and close your table in the footertemplate. Set the bgcolor
of the table to the background you want.

Dale
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uI**************@TK2MSFTNGP09.phx.gbl...
repeater spits out html, you'll have to render it to SOME type of control
that allows coloring of the background

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
I have a repeater and based upon some database results want to change
the backcolor or font color of the row at my databind statement.

I have done this before with a datagrid:

e.Item.BackColor = System.Drawing.Color.Red

But this is unavailable with the repeater. Do I have to change to a
DataGrid for this functionality? Thank you.


Nov 18 '05 #3

P: n/a
jm
"DalePres" <no****@nomail.com> wrote in message news:<Oe*************@TK2MSFTNGP11.phx.gbl>...
I suggest you use a table in your Repeater. Put the opening <TABLE> in the
headertemplate and close your table in the footertemplate. Set the bgcolor
of the table to the background you want.

Dale
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uI**************@TK2MSFTNGP09.phx.gbl...
repeater spits out html, you'll have to render it to SOME type of control
that allows coloring of the background

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"jm" <jo*************@yahoo.com> wrote in message
news:c6**************************@posting.google.c om...
I have a repeater and based upon some database results want to change
the backcolor or font color of the row at my databind statement.

I have done this before with a datagrid:

e.Item.BackColor = System.Drawing.Color.Red

But this is unavailable with the repeater. Do I have to change to a
DataGrid for this functionality? Thank you.



I put it is a label and changed the forecolor. Thanks.
Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.