473,395 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Mouseover/Mouseout for Gridview cells

How does one set a Mouseover/Mouseout event on a cell in a GridView? I can
successfully assign these events to be active on a row in a GridView.

I can do this with a DataGrid, by adding code to the OnItemBoundDataGrid event
Mar 11 '06 #1
2 14655
Sub CustomersGridView_RowDataBound(ByVal sender As Object, ByVal e As
GridViewRowEventArgs)

If e.Row.RowType = DataControlRowType.DataRow Then
'change the hover effect over the first cell in the row

e.Row.Cells(1).Attributes.Add("onmouseover","this. className='something'")

e.Row.Cells(1).Attributes.Add("onmouseout","this.c lassName='somethingelse'")

End If

End Sub

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Matt Colegrove" wrote:
How does one set a Mouseover/Mouseout event on a cell in a GridView? I can
successfully assign these events to be active on a row in a GridView.

I can do this with a DataGrid, by adding code to the OnItemBoundDataGrid event

Mar 11 '06 #2
That's exactly what I was looking for. Thanks!!

"Phillip Williams" wrote:
Sub CustomersGridView_RowDataBound(ByVal sender As Object, ByVal e As
GridViewRowEventArgs)

If e.Row.RowType = DataControlRowType.DataRow Then
'change the hover effect over the first cell in the row

e.Row.Cells(1).Attributes.Add("onmouseover","this. className='something'")

e.Row.Cells(1).Attributes.Add("onmouseout","this.c lassName='somethingelse'")

End If

End Sub

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Matt Colegrove" wrote:
How does one set a Mouseover/Mouseout event on a cell in a GridView? I can
successfully assign these events to be active on a row in a GridView.

I can do this with a DataGrid, by adding code to the OnItemBoundDataGrid event

Mar 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Colin Steadman | last post by:
Help! I'm a stupid HTML bod and I dont do Javascript! I have a grey coloured table that displays certain columns in either red, green or orange to give meaning and emphasis to certain data. ...
1
by: Tony Farrell | last post by:
Hi everyone - I am trying to accomplish a task that i thought would be easy - and at this point - i'm starting to wonder... I have a table setup, one column, ten rows All the cells start...
2
by: Alex | last post by:
On my page I have a lot string like this: <span onmouseover="callMe(this)" onmouseout="callMe(null)" >abc1</span> <span onmouseover="callMe(this)" onmouseout="callMe(null)" >abc2</span> <span...
1
by: johnnydublin | last post by:
Hi there, Does anyone know of a way that I can specify javascript functions that are to be run when a cell is clicked, mouse over etc in a datagrid without attaching the function to every single...
1
by: dheepakk | last post by:
Hi All, When a mouseover event takes place over a link the popup window is displayed. I also have a mouseout on the link.So if the popup window comes up,has a dimension such that the...
1
sgeklor
by: sgeklor | last post by:
Dear All, My question refers to how best to organise my mouse events to correctly and efficiently give the effect I want. On my form I have a panel and that panel contains a number of controls....
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
2
by: markszlazak | last post by:
Could someone check out the following code and please help me understand the problem and fix it. It seems like some events are not firing when my mouse moves over the table cells to quickly causing...
0
by: spacecadet563 | last post by:
I am trying to change and display the image source of an image control (named image2 )on mouseover of cell event on a gridview(Gridview1) with a SQL datasource. The cell contains image name of image...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.