Reg Exp
Web Design
Notes Client
Followup: Hiding Totals In Categorized Web View
As a followup to last week's tip about preventing the totals row from appearing in a web view, someone pointed out that the view, as we described it, would not have alternating row colors. The ND6 server observes the alternating row colors if they are defined and our little trick to hide the totals would wipe that out.

When we were asked, we were quickly able to point the developer in the right direction because we already have a tip posted that talks about how to implement alternate row colors in a web view. So, you just have to combine these two tips to add alternate row colors and still hide the totals.

Since the tip on alternate row colors is a little overkill for what we need, let's simplify things a bit. When you're hiding the totals, the first column of the view, according to last week's tip, is:


Adding some JavaScript to this line is what we need to get things working. So change the first column's value to:

"[<b></b>--></td></tr><script language=JavaScript>document.write(\'<tr\' + (" + @DocNumber + " % 2 ? \' bgcolor=b1dfff>\' : \'>\') + \'<td>\');</script>]"

Leave the last column the way it was in the original tip. Now, your view should both hide the totals and alternate row colors.