Tooltip - Example: Specific Tooltip Data Without LOD

2 posts, 1 answers
  1. orim
    orim avatar
    29 posts
    Member since:
    Mar 2012

    Posted 20 Sep 2012 Link to this post

    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


  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 21 Sep 2012 Link to this post


    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
        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.
  3. DevCraft R3 2016 release webinar banner
Back to Top