On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.
Alternating colors with hidden rows
When alternating row colors are need you usually can just add an expression in the highlights of the detail row that looks like:<br />
<br />
row.__rownum%2 equal 0 which is true every other row. This does not work well if the visibility expression of the row is culling several rows. An alternate approach is to use an onCreate script for the detail row, with code similar to the folllowing:
This script first initializes a counter (jj). When a row is culled because of visibility the this.getStyle().visibleFormat property will specify all the formats that the row is culled for. For example if the row is only dropped in PDF the visibleFormat will contain the value pdf. If the row is not culled the visibleFormat value will be null. So in the above script we toggle the jj variable every visible row.
<br />
row.__rownum%2 equal 0 which is true every other row. This does not work well if the visibility expression of the row is culling several rows. An alternate approach is to use an onCreate script for the detail row, with code similar to the folllowing:
if( typeof jj == 'undefined' ){ jj=0; } if( (this.getStyle().visibleFormat != "all") ){ if( jj !=0 ){ this.getStyle().backgroundColor="Silver"; jj=0; }else{ jj++; } }<br />
This script first initializes a counter (jj). When a row is culled because of visibility the this.getStyle().visibleFormat property will specify all the formats that the row is culled for. For example if the row is only dropped in PDF the visibleFormat will contain the value pdf. If the row is not culled the visibleFormat value will be null. So in the above script we toggle the jj variable every visible row.
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax