This topic is locked
[SOLVED]

 Table - Conditional Formating

12/13/2017 2:15:27 PM
ASPRunner.NET General questions
I
i.NoLim author

Hello,
I'm back, again.... I'm trying to change the background of a row or cell depending on the "TOTAL" amount.
Background: I have 3 tables: Team, Member, and Charges. Family is linked to Member and Member is linked to Charges.
The purpose of the app is for the end user to add a Team name, enter the Members information, and finally any Charges attached to each member. All charges for each team are then total, if the total exceeds 200 the row's, or cell's, background should change color.
Example.

Team A - Total = 100

-Mem1 - MemTotal = 35

-10

-25

-Mem2 - MemTotal = 15

-15

-Mem3 - MemTotal = 50

-30

-20
Team B - Total = 190

-Mem1 - MemTotal = 80

-40

-25

-15

-Mem2 - MemTotal = 45

-15

-30

-Mem3 - MemTotal = 65

-30

-20

-15
Above is what should happen but instead this is happening.
Team B - Total = 190
-40

-25

-15

[color="#008080"] -Mem2 - MemTotal = 45

-15

-30

-Mem3 - MemTotal = 65

-30

-20

-15
I'm using the code in the tutorial.

if (data["TOTAL"]<150)
record["css"]="background:yellow";


Why is it highlighting the rows from the "Member" table instead of the rows from the "Team" table?
I also, try adding the red and green buttons like in the tutorial but that didn't work either. Yes I did put the pictures in the project file.

I
i.NoLim author 12/28/2017



Hello,
I'm back, again.... I'm trying to change the background of a row or cell depending on the "TOTAL" amount.
Background: I have 3 tables: Team, Member, and Charges. Family is linked to Member and Member is linked to Charges.
The purpose of the app is for the end user to add a Team name, enter the Members information, and finally any Charges attached to each member. All charges for each team are then total, if the total exceeds 200 the row's, or cell's, background should change color.
Example.

Team A - Total = 100

-Mem1 - MemTotal = 35

-10

-25

-Mem2 - MemTotal = 15

-15

-Mem3 - MemTotal = 50

-30

-20
Team B - Total = 190

-Mem1 - MemTotal = 80

-40

-25

-15

-Mem2 - MemTotal = 45

-15

-30

-Mem3 - MemTotal = 65

-30

-20

-15
Above is what should happen but instead this is happening.
Team B - Total = 190
-40

-25

-15

[color="#008080"] -Mem2 - MemTotal = 45

-15

-30

-Mem3 - MemTotal = 65

-30

-20

-15
I'm using the code in the tutorial.

if (data["TOTAL"]<150)
record["css"]="background:yellow";


Why is it highlighting the rows from the "Member" table instead of the rows from the "Team" table?
I also, try adding the red and green buttons like in the tutorial but that didn't work either. Yes I did put the pictures in the project file.


Resolved by entering the following in the "List page: After record processed" event:



if (data["TOTAL"] < "150")

{

row["rowstyle"]="style='background: #3ED179' + data[\"TOTAL\"].ToString() ";

}