Wednesday, March 28, 2012

Tablecell backcolor?

// Add the new cell that will host the child grid
TableCell newCell = new TableCell();
newCell.ColumnSpan = cellsToSpanOver;
newCell.BackColor ="#fafad2"; ************ I know this is not right
DavidTry to use css classes... It should be better...
Thanks,
Yunus Emre ALPZEN
BSc, MCSD.NET
"Fetty" <davef@.helixpoint.com> wrote in message
news:%23DVhA1uYFHA.1404@.TK2MSFTNGP09.phx.gbl...
> // Add the new cell that will host the child grid
> TableCell newCell = new TableCell();
> newCell.ColumnSpan = cellsToSpanOver;
> newCell.BackColor ="#fafad2"; ************ I know this is not right
>
> --
> David
>
if you look at the datatype of BackColor, you'll see its of datatype Color,
so you know you need to pass a Color. Now we look in the doc's for the Color
class. Here we see a bunch of ways to create a color, from name, from RGB,
etc. so after 60 seconds of reading the doc's we get:
newCell.BackColor = Color.FromArgb(0xfafad2);
-- bruce (sqlwork.com)
"Fetty" <davef@.helixpoint.com> wrote in message
news:%23DVhA1uYFHA.1404@.TK2MSFTNGP09.phx.gbl...
> // Add the new cell that will host the child grid
> TableCell newCell = new TableCell();
> newCell.ColumnSpan = cellsToSpanOver;
> newCell.BackColor ="#fafad2"; ************ I know this is not right
>
> --
> David
>

0 comments:

Post a Comment