cancel
Showing results for 
Search instead for 
Did you mean: 

coloring alternate rows for a list

Former Member
0 Kudos
1,058

How to color alternate rows in a datawindow list

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

If you need the colored rows on a printed report you have to select "Print Shows Background" in datawindows print properties.

Former Member
0 Kudos

If you do it in code like AV said or directly in the DataWindow like I suggested, you have to make sure all the objects on the detail band are using Transparent for Background Color.

Former Member
0 Kudos

Use the following for the detail band Color computed value:

if ( mod(getrow(),2) = 0, 536870912, 65535 )

In this example, 536870912 is Transparent and 65535 is Yellow.

Former Member
0 Kudos

I assume you mean to change the background color of the row. Use this code to set background color for alternate rows:

dw_1.Modify("datawindow.detail.Color='0~tIf(mod(getrow(),2)=0,134217728,553648127)'") 
,