Datagrid row blink

  • Thread starter Thread starter Ian Frawley
  • Start date Start date
I

Ian Frawley

Anyone know how you would make a ASP.NET DataGrid row blink?

--
Ian (Freebasing On Boredom.......)

BEING IN THERAPY
And yet, having therapy is very much like making love to a beautiful
woman. You... get on the couch, string 'em along with some half-lies and
evasions, probe some deep dark holes, and then hand over all your
money.
 
Ian,

In order to do this, you would have to write javascript code on the
client which would react to some sort of event (time, user interaction, etc,
etc). It would change the color of the element that you want, and then set
the timeout (through setTimeout) to be called at a time interval when you
want the color to be changed back.

Hope this helps.
 
Cheers I have done with the following bit of JavaScript:

<SCRIPT language="javascript">
var colours = new Array();
var oInterval = "";

function chcolor()
{

var rows = AppHeader__ctl1_ucAlarms_Alarm.getElementsByTagName("tr");

for( x = 0; x < rows.length; ++x)
{
var acked = rows[x].cells[6].innerHTML;

if(acked == "False")
{
if(rows[x].style.backgroundColor != "white")
{
colours[colours.length] = rows[x].style.backgroundColor;
rows[x].style.backgroundColor = "White";
}
else
rows[x].style.backgroundColor = colours[x];
}
}

}

oInterval = window.setInterval("chcolor()",500);
</SCRIPT>

It works a treat :o)

Nicholas Paldino said:
Ian,

In order to do this, you would have to write javascript code on the
client which would react to some sort of event (time, user interaction, etc,
etc). It would change the color of the element that you want, and then set
the timeout (through setTimeout) to be called at a time interval when you
want the color to be changed back.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ian Frawley said:
Anyone know how you would make a ASP.NET DataGrid row blink?

--
Ian (Freebasing On Boredom.......)

BEING IN THERAPY
And yet, having therapy is very much like making love to a beautiful
woman. You... get on the couch, string 'em along with some half-lies and
evasions, probe some deep dark holes, and then hand over all your
money.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top