This topic is locked

editing row shading in 5.2

6/23/2008 1:33:25 PM
ASPRunnerPro General questions
M
mfred author

In 4.x, I edited the row shading code listed below so that specific entry statuses would show as specific colors. Since upgrading to 5.x, I do not find the code in the ASP files. It used to be present on the ASP pages. I need to locate the code that controls the shading of every other row so that I can continue with the same color scheme that we have been using. Thanks.
The old code:

' To insure that every other one is shaded

If iShadeTheDetail = 0 then

sShadeClass = "class=shade"

iShadeTheDetail = 1

Else

sShadeClass = ""

iShadeTheDetail = 0

End If

M
mfred author 6/25/2008

I see. Thank you. However, what I need to do is a conditional statement, which worked in 4.x as noted earlier. The code or variation that I want to insert is:
if rs("RedFlag")="Yes" then

sShadeClass = "style=""background-color:pink"""

end if
Basically, I want the row to be red if the RedFlag field says Yes.

Sergey Kornilov admin 6/25/2008

You can use a conditional statement there. In earlier versions you had to modify generated files. Now you place the same code to events.

M
mfred author 6/25/2008

Do you see any potential conflicts with my code, I put in in the indicated event but nothing happened. Thanks.

Sergey Kornilov admin 6/25/2008

Your code doesn't make much sense in version 5.2.
You need to use sample code provided in tutorial and add your IF statement.