I have a ddlb/dddw column in my datawindow. When the user selects a certain value in this column I want to change the color of the entire row to a certain color.
How do I change the color of the row(not the column)?
In datawindow design, select the details band and open the properties page. There you will find a list box for selecting color of the row where you can define the conditional expression. You only need to know the color code which you wish to set for the row
e.g. if you want your default row colour to be mint and the selected row color to be blue you can set the expression as
if(<expression for column check say col1 = something>,<integer color code for blue>,<integer color code for mint>)
If you have any doubt about the integer value of the colour, you create a dummy datawindow and export it to srd and open in a text editor.There you will be able to figure out the colour codes.
Thanks, this partially worked. When you initially open the window and the column that the detail band expression is based on has the value I want, the rows are the appropriate color. However, when I select a different value for that column in the ddlb, I expect the whole row to change to the color I set for the false condition in the expression on the detail band. Instead, only the column that I changed the value for turns to the appropriate color and the other columns stay the same until I tab to it then it changes color. For example:
//detail band expression
If(col1=1,rgb(255,0,0),rgb(0,255,0)) //True=red, False=green
If I change the value to 1 in col1, then col1 turns to red and the other columns stay green until I tab to them and then it turns to red.
I want the whole row to change colors as soon as I change the value in col1. How do I accomplish this?
I'm assuming I would have to have the detail band expression in the itemchanged event.If so, what is the correct syntax in the event to access the detail band of the dw? I'm using PB6.5
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.