Question about onHover

3 posts, 1 answers
  1. Luke Kasper
    Luke Kasper avatar
    18 posts
    Member since:
    Mar 2010

    Posted 13 Oct 2010 Link to this post


    I'm having trouble getting the onhover events to work the way I want and I was hoping someone could help.  Right now, I have javascript wired up to the OnRowMouseOver event for my grid, but I'm having issues finding out which particular cell the mouse is over to display the text I need to display.  For instance, my OnRowMouseOver event calls a function changeRow(srcRow,e).  The first two lines of changeRow are this:

    var node = $find(e.get_id());

    node = node.get_element();

    Now, my node variable has the row record, but I have no clue what cell the pointer was over.  I have a function set up where all I have to do is pass it the text that I want to display in the hover text and it'll do the legwork, but I can't figure out what text to send along because I don't know what cell is being hovered over.

    I've looked and looked, but I can't find anything listed that will help with this.  Also, I'd like to avoid using an onmouseover event for EVERY cell in the grid because the number of cells possible for this implementation is in the thousands, and it'll really hit our performance I fear.  As a kinda "gotcha", this function used to work with the ASP.NET RadControls, but now that I'm trying to upgrade to ASP.NET AJAX RadControls, it doesn't work anymore.

    Can anyone help me with this?  I feel like it'll be something easy that I'm overlooking, but for the life of me I can't figure out what it is.

    Thank you!
  2. Answer
    Dimo avatar
    8318 posts

    Posted 13 Oct 2010 Link to this post

    Hello Luke,

    This is what you need:

            <ClientEvents OnRowMouseOver="MyRowMouseOver" />
    <script type="text/javascript">
    function MyRowMouseOver(sender, args)
        var cell = args.get_domEvent().target;

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Luke Kasper
    Luke Kasper avatar
    18 posts
    Member since:
    Mar 2010

    Posted 18 Oct 2010 Link to this post

    Thank you!  That answered my question, although it leads to another question, which I'll raise in another thread.
Back to Top