Thursday, October 8, 2009

Xpages: Alternate View Row Colors Made Easy

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

.odd {
background-color: rgb(248, 248, 248);
}

.odd:Hover {
background-color: rgb(288, 250, 221);
}

.even {

}
.even:Hover {
background-color: rgb(288, 250, 221);
}




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

3 comments:

Anonymous said...

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

Yatin said...

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

Nathan said...

Excellent tip, works great! Thanks

Post a Comment