Xpages: Alternate View Row Colors Made Easy

On October 8, 2009, in xpages, by Mark Hughes

This may be old news to some, but for me a tip from Paul Hannan made a big improvement to how my views look in X-Pages.

First open the view in designer on your x-page, then click on All Properties, look for rowClasses

enter in two or 3 classes like – even, odd

designer

now add some css to your style sheet

<span style="color: rgb(204, 102, 51);">.odd</span> {<br /> <span style="color: rgb(0, 0, 255);">background-color</span>: rgb(248, 248, 248);<br />}<br /><br /><span style="color: rgb(204, 102, 51);">.odd</span>:Hover {<br /> <span style="color: rgb(0, 0, 255);">background-color</span>: rgb(288, 250, 221);<br />}<br /><br /><span style="color: rgb(204, 102, 51);">.even</span> {<br /><br />}<br /><span style="color: rgb(204, 102, 51);">.even</span>:Hover {<br /> <span style="color: rgb(0, 0, 255);">background-color</span>: rgb(288, 250, 221);<br />}

That’s it, really simple alternate row colors in X-pages

The results will look something like this, depending on the contrast level on your screen you may or may not see the alternate line colors as they are very light gray with the hover color light yellow.

sample

 

2 Responses to Xpages: Alternate View Row Colors Made Easy

  1. Anonymous says:

    Wow, that was easy!!
    Thanks for the tip.

  2. Yatin says:

    That was a great help… had been looking for the solution for a really long time… had given up on that… thanks a lot

Leave a Reply

Your email address will not be published. Required fields are marked *