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

[Solved] Mouse over event on a row in the RadGrid

2 Answers 153 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
NARESH KUMAR NARMALA
Top achievements
Rank 1
NARESH KUMAR NARMALA asked on 28 Jan 2010, 11:54 PM
Hi I am using RadGrid on a web page and I am firing a java script function on mouse over event on a row in the RadGrid.As of now the java script function is fired as soon as the mouse is pointed over a row.I would like the java script function to be fired after a delay of 3-4 secs after the mouse is pointed over the row in the radgrid.Please suggest some code for doing this

Regards,
Naresh

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Jan 2010, 07:41 AM
Hello Naresh,

One suggestion to achieve same scenario is by using setTimeout() method to provide delay in executing the code as shown below. Declare the variables globally so that it is possible to access outside the OnRowMouseOver handler.
 
JavaScript:
 
    var grid; 
    var dataItem; 
    function OnRowMouseOver(sender, args) { 
        grid = sender; 
        dataItem = args.get_gridDataItem(); 
        setTimeout("callMe()", 3000); 
    } 
    function callMe() { 
        alert(dataItem.getDataKeyValue('CustomerID')); // Execute your code here 
    } 

-Shinu.
0
Ismail Ahmed Syed
Top achievements
Rank 2
answered on 29 Jan 2010, 09:33 PM
I want the event only to be  fired when the user is over that row for say 5 seconds or more.Can you please help me.
Tags
General Discussions
Asked by
NARESH KUMAR NARMALA
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ismail Ahmed Syed
Top achievements
Rank 2
Share this question
or