How do I change the BackColor of a Repeater?

  • Thread starter Thread starter jm
  • Start date Start date
J

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.
 
repeater spits out html, you'll have to render it to SOME type of control
that allows coloring of the background
 
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
 
DalePres said:
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

I put it is a label and changed the forecolor. Thanks.
 
Back
Top