This is a migrated thread and some comments may be shown as answers.

Image inside radgrid hover issue

1 Answer 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
dexter
Top achievements
Rank 1
dexter asked on 22 Jan 2012, 05:41 PM
This is what happen. I have an image for a column and on itemdatabound, i will set each of the item with attribute onclick to call a js function(which will make the tooltip appear). This is all good, but the problem is, lets say the image i clicked earlier(in order to make the tooltip appear) is on the 1st row. Then i click on the tooltip x button to close it. Then i hover on the 1st row again, the tooltip appears? But i didn't set the onmouseover attribute. Why is the tooltip appears when hover?

Then if i click on the 2nd row, and i try to hover on the 1st row, the tooltip will not appear. But the problem will happen to the 2nd row. Which to sum it up, the tooltip appeared for the active row. So anyway to turn this off?

Regards,
Dexter

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Jan 2012, 04:42 PM
Hi Dexter,

I suppose your code is based on this online demo where the RadToolTipManager's client-side API is used. Since you want the tooltips to appear on the click event only I suggest you set the manager's ShowEvent property to OnClick. If it is not set (as is in the demo) it defaults to OnMouseOver.

What happens is that the manager creates a tooltip for this certain image and its show event is OnMouseOver, so mousing over again will naturally show the tooltip. Alternatively you can set the ShowEvent to FromCode to make sure only your handler will show a tooltip via JavaScript. What I can also suggest is to simply add the images to the TargetControls collection of the RadToolTipManager and even avoid writing custom JavaScript.


All the best,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
General Discussions
Asked by
dexter
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or