|
|
Re: Changing row formatting depending on the row number... [message #69758 is a reply to message #69656] |
Fri, 26 August 2005 08:06 |
Frédéric Ferrant Messages: 75 Registered: July 2009 |
Member |
|
|
>you should be able to set a global variable then access that variable in
>the expression on the conditional highlighting using the mod code you
>provided
Thanks for your suggestion, David, but this doesn't work as I'd like
it to. I already had tried such a thing (the boolean test and the n %
2 test are the same).
I finally figured out a workaround, but it's a little tricky (I'm not
satisfied with it, allthough it works).
This is what I would like:
----------------------------
I would like to format the entire row background depending on the row
number. I tried doing this by selecting the row in the table (layout
mode), and setting a Highlight condition (n++ % 2 Equal 0) or (c=!c
Equal true).
Why it doesn't work:
------------------------
Unfortunately, the condition is checked for each cell in the row, and
not per row. Instead of having a table with even rows grey and odd
rows white, the table has cells alternatively grey and white on the
same row...
If you check the Highlight condition on each cell, it is indeed set to
the same condition as the one entered or the row.
This is what I had to do to get it to work:
------------------------------------------------
I removed the condition on each cell but the last one in the row.
The condition on the row is now: (n % 2 Equal 0), and the condition
on the last cell of the row is (n++ % 2 Equal 0).
Why I don't like that workaround:
---------------------------------------
The inconvenient of the workaround is that, if I add another data
column to the right of my row, I have to change the formatting code on
the last column... Thing which can easily be forgotten...
And the logic isn't to format the last cell differently than the
others, the logic is to format the entire row...
My questions:
---------------
1. Is it impossible to format rows? Does this in fact format the cells
composing the row...?
2. Is it possible to know the row number?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03494 seconds