Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Show border around datagrid row on mouseover?

Thread Tools

Re: Show border around datagrid row on mouseover?

Anthony Jones
Posts: n/a

"Arch Stanton" <(E-Mail Removed)> wrote in message
news:mOqml.9677$(E-Mail Removed)...
>I have datagrids with alternating colors, and I've been experimenting with
>jazzing them up with a color change on mouseover. What I'd really like to
>do instead is to add a border to the datagrid row on mouseover.
> My mouseover code looks like this:
> Protected Sub DataGrid_ItemCreated(ByVal sender As Object, ByVal e As
> System.Web.UI.WebControls.DataGridItemEventArgs)
> e.Item.Attributes.Add("onmouseover"," ckgroundColor='green';")
> e.Item.Attributes.Add("onmouseout"," kgroundColor='white';")
> end sub
> Is there a straightforward way to add a border around the row instead of
> changing its color? I've been Googling this for two hours, but I can't
> find anything I can make work.

Make sure your css for the unadorned TR has a border of the same color as
the content background say "1px solid white"


e.Item.Attributes.Add("onmouseenter"," order = '1px solid
e.Item.Attributes.Add("onmouseleave"," order='';")

(Note you may not want to run code on all bubbled over/outs use the
non-bubbling enter/leave)

Anthony Jones - MVP ASP/ASP.NET

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid Border around earch row =?Utf-8?B?QWxleCBNYWdoZW4=?= ASP .Net 4 06-01-2007 06:26 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
ok I can do a totals row but how about a percentage row after each data row D ASP .Net Datagrid Control 0 05-23-2005 04:10 PM
Datagrid Border showing when I say no border tshad ASP .Net 0 01-31-2005 05:40 PM
datagrid question border around cells =?Utf-8?B?UGF1bA==?= ASP .Net 4 12-07-2004 03:37 PM