Hi all:
I have a grid with a couple of text boxes that hold cost, price, and available. I retrieve live-price information and need to indicate the changes by changing the background color of the text box.
If the cost goes down, the background should change for that particular textbox to green.
The problem i'm having is when I change the backcolor property, the textbox background stays white unitl i select the textbox. How can I have that particular box show green background whether selected or not?Are you using the Textbox.BackColor()?
For this you should be using the Column.DynamicBackColor and DynamicForeColor properties.
How are you keeping track of the change?
If you're comparing 2 fields (like OldCost and NewCost, e.g.) that would look something like this - this example does Green/Black for down, Red/White for up, White/Black as default:
Column.DynamicBackColor="IIF(NewCost < OldCost, RGB(0,255,0), IIF(NewCost > OldCost, RGB(255,0,0), RGB(255,255,255)))"
<pre>Column.DynamicForeColor="IIF(NewCost > OldCost, RGB(255,255,255), RGB(0,0,0))"
HTH
Insanity: Doing the same thing over and over and expecting different results.