How to change cell color or font color when data changed 
Author Message
 How to change cell color or font color when data changed

How to change cell color or font color when data changed

Hi All,

I am useing a ASP display data from SQL and the data will
update every 10 seconds, then the ASP will refresh. How
can I change the table cell color or font color when the
data in this cell is chnged.

Pls help.....

Kel



Thu, 06 Jan 2005 21:10:58 GMT  
 How to change cell color or font color when data changed
kelvinfun wrote on 21 Jul 2002 in microsoft.public.scripting.VBScript:

Quote:
> How to change cell color or font color when data changed

> Hi All,

> I am useing a ASP display data from SQL and the data will
> update every 10 seconds, then the ASP will refresh. How
> can I change the table cell color or font color when the
> data in this cell is chnged.

Depending on your code, the ASP-page should know if de date is changed.
You probably have to save the old data somewhere.

<%
myDataIsChanged = (olddata <> data)

If myDataIsChanged Then
   datacolor="red"
Else
   datacolor="green"
End If
%>

<TD style="color:<%=datacolor%>;"><%=data%></TD>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)



Thu, 06 Jan 2005 21:30:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to change cell color or font color when data changed

2. Change the color of form's caption (background and font color)

3. Changing MSFlexGrid Cell Color w/o Changing Focus?

4. win forms data grid change cell color on condition

5. Change font and font color inside a textbox

6. Changing BG color on a cell in a table onmouseover

7. How To Dynamically Change Cell Background Color

8. Changing cell colors in a pivotTable?

9. Macro/VBA Code for changing the cell shade color

10. question on changing row color by specified cell value in winform datagrid

11. Change a cells color in datagrid

12. How to change color of individual cell DataGrid.

 

 
Powered by phpBB® Forum Software