Wednesday, June 17, 2009

Alternate Styling

Want to make alternate styling in a DataViewWebPart or ContentQueryWebPart? Here is the way:

<tr>
    <xsl:if test="position() mod 2 = 0">
        <xsl:attribute name="class">AlternatingClass</xsl:attribute>
    </xsl:if>

    <td ...>
    ...
</tr>

Where AlternatingClass: is the alternating class name that will be the value of the class attribute of the TR tag.

No comments:

Blessings of working on large real-world projects

Working on large real-world projects can offer numerous blessings and benefits, both professionally and personally. Here are some of the key...