Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jan 10, 2008 07:46
open dhtmlx forum
Mouse out/Mouse leave Dhtmlx Grid - Rows on Grid

Mouse out/Mouse leave Dhtmlx Grid

I have onMouseOver event and the function while cursor enters on the row in the grid.
div_BannerText.attachEvent("onMouseOver",function{});
I would like to know how to do while cursor move out of the row in the grid.

Like linkbuttton we have mouse over, mouse out event.

can you explain me how to do.
Answer posted by Support on Jan 10, 2008 08:56
It possible to attach event for each row in grid , but it pretty expensive way

    //after data loaded in grid
    grid.forEachRow(function(id){
       dhtmlxEvent(grid.rowsAr[id],"mouseout",function(){
                ...your code here...
        })
    });

Actually you can use use onMouseOver to detect mouseOut event

var lastID = null

grid.attachEvent("onMouseOver",function(id){
    if (lastID && lastID!=id){
       //onmouseout logic here
       lastID=id;
    }
    else {
       //onmouseover logic here
    }
});