473,385 Members | 1,282 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,385 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 14652
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.