This topic is locked

Conditional Formatting of List Screen

11/21/2014 2:00:27 PM
ASPRunnerPro General questions
author

I have had great success in using conditional formatting with the horizontal grid of the list pages of my projects. I have a need to use columns grid with a list page and I find that the normal code I add to the event , List page:After record processed, does not allow for the conditional formatting I previously used.
This is the code that works well with the horizontal grid:
If data("CaseStatus")="Active" then

record("CaseNumber_style") = record("CaseNumber_style") & "style='background:yellow'"

end if
Can anyone tell me if they had success with conditional formatting in the column grid of the list page?
Thanks

Joe

M
Maurits 11/21/2014

I don't know if you have to put a semicolon ";" behind background:yellow
"style='background:yellow;'"

G
gonzalosb 11/24/2014

Hi Tman,long time not talk to you.

ididn't tested but you can try :
If data("CaseStatus")="Active" then

record("CaseNumber_style") = "background:Yellow;"
or
If data("CaseStatus")="Active" then

record("CaseNumber_css") = "background:Yellow;"
let me know if works.

1312 11/25/2014

@ Maurits I am pretty sure it is a ":", but I will try the ";" also.
gonzalosb I will give the code a try to see if it works. It seems that the columns grid may be setup differently but I will do some testing on it.
Thanks to both of you for your reply.

Joe

1312 11/25/2014

gonzalosb tried it both ways and I didn't work at all. Very puzzling.

acaruson 11/30/2014



I have had great success in using conditional formatting with the horizontal grid of the list pages of my projects. I have a need to use columns grid with a list page and I find that the normal code I add to the event , List page:After record processed, does not allow for the conditional formatting I previously used.
This is the code that works well with the horizontal grid:
If data("CaseStatus")="Active" then

record("CaseNumber_style") = record("CaseNumber_style") & "style='background:yellow'"

end if
Can anyone tell me if they had success with conditional formatting in the column grid of the list page?
Thanks

Joe


Go tk the list screen, take a look at the HTML code, make sure there is no "style" settings already there...like "NOWRAP", etc,

If you want the cell not to wrap, you need to put that in your conditional settings.

Let new know of this makes a difference.

1312 12/2/2014



Go tk the list screen, take a look at the HTML code, make sure there is no "style" settings already there...like "NOWRAP", etc,

If you want the cell not to wrap, you need to put that in your conditional settings.

Let new know of this makes a difference.



I checked the html mode of the list screen and didn't find any reference to "NOWRAP".

Joe

acaruson 12/2/2014



I checked the html mode of the list screen and didn't find any reference to "NOWRAP".

Joe


Ok. Double check that there NO "style=" references at all in the cell in question on the List page. If there are any, remove them for the cell in question. Try that.

1312 12/3/2014



Ok. Double check that there NO "style=" references at all in the cell in question on the List page. If there are any, remove them for the cell in question. Try that.


There is on in the area of the CaseStatus:
<TD style="width: 3%;" class="rnr-gridfieldlabel {$CaseStatus_label_class}" {$recordattrs}>

{$label dbo_NSS CaseStatus}

</TD>
If I remove this won't it break the column list?

Joe
I also found:
<TD class="{$CaseStatus_class}" {$recordattrs}>

{$CaseStatus_value}

&nbsp;

</TD>

acaruson 12/3/2014



There is on in the area of the CaseStatus:
<TD style="width: 3%;" class="rnr-gridfieldlabel {$CaseStatus_label_class}" {$recordattrs}>

{$label dbo_NSS CaseStatus}

</TD>
If I remove this won't it break the column list?

Joe
I also found:
<TD class="{$CaseStatus_class}" {$recordattrs}>

{$CaseStatus_value}

&nbsp;

</TD>


Try getting rid of in the LIST page...
...and using the following in your conditional code:
If data("CaseStatus")="Active" then

record("CaseNumber_style") = record("CaseNumber_style") & [color="#0000FF"]"style='background:yellow; width: 3%'"

end if
Essentially, you can't have any "Style" reference in the LIST page if you are trying to change it conditionally. See if that works...