Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am trying to add background color to table, i am updating XML at runtime.
what i have achived is with following code is i am able to color first 3 rows
<BackgroundColor>=iif(RowNumber(Nothing)> " + cout + ", \"#fff7a9\", \"#baecc4\")</BackgroundColor>

i need to color last 4 rows also how can i do in same command?

What I have tried:

i have tried following code but it did not work
<BackgroundColor>=iif(RowNumber(Nothing)>= " + cout + ", \"#fff7a9\",iif(RowNumber(Nothing)>= " + dt2count + ", \"#baecc4\") </BackgroundColor>

<BackgroundColor>=iif((RowNumber(Nothing)>= " + cout + ", \"#baecc4\", \"#fff7a9\" AndAlso RowNumber(Nothing)> " + dt2count + ", \"#baecc4\", \"#fff7a9\"))</BackgroundColor>


in the above code,"cout" gives count of first three rows and "dt2count" gives count of last 4 rows.
Posted
Comments
[no name] 5-Mar-19 13:44pm    
The only "reasonable" solution is a property / getter in the data source that conveys what color to use for that row.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900