Friday, March 23, 2012

Highlighting in tables.

I would like to highlight every other line in a table to enhance readability. Is there an easy way to do this? If so, how?

TIAHi Tia,

I just started writing custom code today - so naturally I think it can solve all problems!

I'm thinking you may be able to write custom code to set the table row's background
property based on if it is an "even" or "odd" row. I looked around and there doesn't
seem to be an easy way like we have on ASP.Net grid controls. Has anyone
done something like this using custom code?

Jane|||actually I thgt abt it for a while and its not very complicated. in your properties tab for that textbox or for the row, click on the color property and click on "Expressions" and you can write an expression over there like a regular one

 IIF(Fields!yourval.value <10, " Red", "Blue")

hth|||Dinakar,

Thanks! the expression I finally chose was:

=iif(RowNumber(Nothing) Mod 2, "WhiteSmoke", "White")

set on the row level properties tab in BackgroundColor. This highlights every other row of my table, making it easier to read.

Regards,

Daniel|||

chanbe backgound property of the table as =iif(((rownumber("table1") mod 2)=0),"White","#FFEBBD")

here "table1" is ur table name

sql

No comments:

Post a Comment