Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2211
Node: Client Side Events: OnNodeHover???
posted

I guess this was not added to the CSOM. Anyone had any luck implementing something that can tell when the mouse is hovering over a node? I need to trigger a javascript function when a user hovers on a node.

Parents
  • 1923
    Verified Answer
    posted

     Hi.

     I required the same functionality and was able to successfully wire up the event.

    1. Copy the ig_webtree.js file from the scripts directory where you installed infragistics into your project folder. (located maybe in C:\Program Files\Infragistics\NetADVantageversionX\ASP.NET\Scripts)

    2. Set the JavascriptFilename property on the tree to the file you've copied.

    3.Modify the copied Javascript file.

        - Look for the following functions within:

            function igtree_mouseover(evnt,tn) which in my version was on line 1089. At the end of the function there is an if statement if(igtxt!=null && igtxt.length>0) { ...     somewhere inside that if statement, write a call to a new function. e.g. MyMouseOverFunction(tn,eNode.id) and then create this function in your own javascript files. 

     then you've got your event!

    If you also want the Mouse Out event. The next function in the ig_webtree should be called function igtree_mouseout(evnt,tn). look for the if statement near the end of the function like: if(src.hoverSet) { and put your function in there MyMouseOutFunction(tn,eNode.id)

     

    hopefully this was helpful! 

Reply Children
No Data