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

Tooltip - Example: Specific Tooltip Data Without LOD

1 Answer 31 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
orim
Top achievements
Rank 1
orim asked on 20 Sep 2012, 10:31 AM
Hi,
i tried your example Specific Tooltip Data Without LOD.
I created an Application with the same scenario. I used same javascript and code behind. Only difference i use scrolling in radgrid.
But every time i hover over the same row after the tooltip closed i get a javascript error.
Runtime Error in Microsoft JScript: The property `innerHTML` No value can be determined: the object is null or undefined
Hovering over a different row is no problem.
Please can someone help it is very urgent

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 21 Sep 2012, 01:21 PM
Hello,

You can use the following function to set the content. It copies the HTML template instead of moving it and uses a parent element for getting the references to the spans:
function createContent(sender, args)
{
    //move the content first to allow the browser to cache the image
    sender.set_content($get("ttipContent").innerHTML);
    var dataKeys = sender.get_value().split("|");
    var ttipParent = sender.get_popupElement();
    $get("productHolder", ttipParent).innerHTML = dataKeys[0];
    //if this is called before the content is moved the browser will request the image again
    $get("productImage", ttipParent).src = String.format("../../../Img/Northwind/Products/{0}.jpg", dataKeys[1]);
    $get("quantityHolder", ttipParent).innerHTML = dataKeys[2];
    $get("stockHolder", ttipParent).innerHTML = dataKeys[3];
    $get("contactHolder", ttipParent).innerHTML = dataKeys[4] + ", " + dataKeys[5];
    $get("cityHolder", ttipParent).innerHTML = dataKeys[6];
    $get("countryHolder", ttipParent).innerHTML = dataKeys[7];
}

You can further modify it to use classes instead of IDs, use jQuery to get the references, etc.

I have also updated your Telerik points for your report.

All the best,
Marin Bratanov
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
ToolTip
Asked by
orim
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or