Home All Groups Group Topic Archive Search About

AlternatingItemStyle color question

Author
2 Feb 2006 5:22 AM
simon
hello,
i have a datagrid, i've set the "header" row to have a white
background with <HeaderStyle BackColor="#ffffff"></HeaderStyle>
and want the color of the data rows to alternate between a color and
white.  so i have added
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
which works fine.  the only problem is that the first row is white and
i would like to have that one colored, the 2nd white, the 3rd colored,
etc.

so how do you make the first row colored?  searched
AlternatingItemStyle and could not find a reference to how to do this.

thanks as always for any help!

Author
2 Feb 2006 2:08 PM
Elton Wang
Hi Simon,

Try
ItemStyle-BackColor ="Gainsboro" AlternatingItemStyle-BackColor="White"

HTH



Show quoteHide quote
"simon" <m*@here.com> wrote in message
news:k353u1d97rpcr4ra0h9r2t79ums2f3k4je@4ax.com...
> hello,
> i have a datagrid, i've set the "header" row to have a white
> background with <HeaderStyle BackColor="#ffffff"></HeaderStyle>
> and want the color of the data rows to alternate between a color and
> white.  so i have added
> <AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
> which works fine.  the only problem is that the first row is white and
> i would like to have that one colored, the 2nd white, the 3rd colored,
> etc.
>
> so how do you make the first row colored?  searched
> AlternatingItemStyle and could not find a reference to how to do this.
>
> thanks as always for any help!
>