We help IT Professionals succeed at work.

Javascript mouseover event on datagrid

kdeutsch
kdeutsch asked
on
Medium Priority
270 Views
Last Modified: 2012-05-06
I have a datagrid and in column 1 it has technician leve such as technical level 1, technical level II and so on.  What I would  like to happen is if someone mouses over the column it will show what the training is for that technical level.  So if a user mouses over technical level 1 it will show the requirements.  Still using datagrids in asp.net 1.1  Thanks
Don't know where to start for this

Open in new window

Comment
Watch Question

I'm not sure if this in .Net 1.1 or not.  You can use the ToolTip property on a LinkButton, Label, etc. to display a message when the user hovers the mouse over a control.

Commented:
You get the data in form is dataset/ or datatable.
You have datagrid, ie dgTechnicians
During the datagrid binding, dgTechnicians_databound event
Private Sub dgTechnicians_databount(
(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgTechnicians.DataBound
Commented:
Pushed the wrong button.
I am in framework 2.0, so below  in the code snippet is just a rough skeleton of what should happen:

Private Sub dgTechnicians_databount(
(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgTechnicians.DataBound 
For each dgr as datagridrow in dgTechnician.row
 
  if dgr = datacontrolrowtype.datarow then
 Dim txtBox1 as textboy = CType (dgr.findcontrol"nameoftextbox", textbox, textbox)
 ' now attach the tooltip to your textbox
Dim strTooltip as string
strTooltip = "build your string for the tooltip "
  txtBox1.tooltip = strTooltip 
  end if
next

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Sorry took so long to accept
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.