Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Conditional Formatting on List Page

$
0
0
Help please on two issues.

First issue:
On the view page, I used the code below, the field defined as ANS-ANSI Requirements works and returns text in Red, however the ANSI field does not.

Before Display
pageObject.setProxyValue("ANSI", values["ANSI"]);

Javascript onload event
var ctrlValueA = Runner.getControl(pageid, 'ANSI');
var ctrlFieldB = Runner.getControl(pageid, 'ANS_ANSI_Requirements');

if(proxy['ANSI']=="Y"){
ctrlFieldB.addStyle('color: red;');
ctrlFieldA.addStyle('color: red;');}

Second issue:

When I try the same code on the List page, it fails to build, the build seems to be related to the before display values.

The build error log contains:

\\ HR_Tools.csproj
Microsoft ® Build Engine version 4.7.2053.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright © Microsoft Corporation. All rights reserved.

\\ HR_ToolsEventsCS.csproj
Microsoft ® Build Engine version 4.7.2053.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright © Microsoft Corporation. All rights reserved.

include\dbo_Nuclear_Job_Descriptions_Active_TableEvents.cs(38,34): error CS0103: The name 'values' does not exist in the current context [Y:\inetpub\wwwroot\NSPRoot\HRTools\HR_ToolsEventsCS.csproj]

Viewing all articles
Browse latest Browse all 2586