DataView client coloring

I

InK_

Hi, All!

I need to accomplish such functionality:
A data row should be highlighted with the other color if cursor is over it.

I also have the old code from asp which uses
<tr onmouseover="colorrow(this,'#EEEEEE');"
onmouseout="colorrow(this,'#FFFFFF');">

for every row of a table.

What can I do to achieve the same for DataView or may be I should use
something else?

Thanks
 
I

InK_

Hi all!

This sample helped:

Protected Sub grid1_RowCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles grid1.RowCreated
If e.Row.RowState = DataControlRowState.Alternate OrElse
e.Row.RowState = DataControlRowState.Normal Then
e.Row.Attributes("onmouseover") = "colorrow(this,'#EEEEEE');"
e.Row.Attributes("onmouseout") = "colorrow(this,'#FFFFFF');"
End If
End Sub
 

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

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top