Wednesday, March 7, 2012

Different row colors (AlternatingItemStyle in asp.net)

Hi everyone!
Is it possible to changes the background color for each row? People coding
asp.net would know this as "AlternatingItemStyle" in a datagrid.
Can this be done using the VS IDE or do I have to go behind the code in the
rdl file?
Best Regards
Jesper.Hello Jesper,
you can put the following into the Background-property in VS IDE:
Backgroundcolor
=IIF(RowNumber("<table1>") Mod 2, "<color1>", "<color2>")
That's all.
Stefan
"Jesper Jensen" <jbj@.union.dk> schrieb im Newsbeitrag
news:egG1HdNrHHA.1204@.TK2MSFTNGP04.phx.gbl...
> Hi everyone!
> Is it possible to changes the background color for each row? People coding
> asp.net would know this as "AlternatingItemStyle" in a datagrid.
> Can this be done using the VS IDE or do I have to go behind the code in
> the rdl file?
> Best Regards
> Jesper.
>|||Hello Stefan
So simple and so powerfull.
Thank you very much!!!!!
Best Regards
Jesper
"Stefan" <stefan@.nospam.nospam> wrote in message
news:eqki9NOrHHA.1168@.TK2MSFTNGP03.phx.gbl...
> Hello Jesper,
> you can put the following into the Background-property in VS IDE:
> Backgroundcolor
>
> =IIF(RowNumber("<table1>") Mod 2, "<color1>", "<color2>")
>
> That's all.
>
> Stefan
>
> "Jesper Jensen" <jbj@.union.dk> schrieb im Newsbeitrag
> news:egG1HdNrHHA.1204@.TK2MSFTNGP04.phx.gbl...
>> Hi everyone!
>> Is it possible to changes the background color for each row? People
>> coding asp.net would know this as "AlternatingItemStyle" in a datagrid.
>> Can this be done using the VS IDE or do I have to go behind the code in
>> the rdl file?
>> Best Regards
>> Jesper.
>

No comments:

Post a Comment