Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do I change the BackColor of a Repeater?

Reply
Thread Tools

How do I change the BackColor of a Repeater?

 
 
jm
Guest
Posts: n/a
 
      05-12-2004
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.
 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      05-12-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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.



 
Reply With Quote
 
 
 
 
DalePres
Guest
Posts: n/a
 
      05-13-2004
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$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) 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.

>
>



 
Reply With Quote
 
jm
Guest
Posts: n/a
 
      05-14-2004
"DalePres" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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$(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto change an Column Backcolor? Carlos Barini ASP .Net 0 07-19-2006 02:17 PM
change backcolor of cell in runtime rjl ASP .Net 5 11-23-2005 01:52 PM
Datagrid onclick change cell backcolor Franck ASP .Net 1 06-07-2005 01:24 PM
How to change backcolor in the new tablecell? Vadim ASP .Net 1 02-24-2005 03:07 PM
Change button backcolor in C# ASP.NET Grey ASP .Net 2 05-17-2004 09:41 AM



Advertisments