Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cell tooltip in SlickGrid

Some cells in my SlickGrid table have myClass class.

I added a tooltip for them like this:

$(".myClass").hover(// Mouse enters
                    function(e) {...},
                    // Mouse leaves
                    function() {...});

It works fine, but if I scroll the table to the bottom, and then scroll it back to the top, the tooltip does not appear anymore.

Can someone suggest any workaround ?

Thanks !

like image 523
Misha Moroshko Avatar asked May 06 '10 03:05

Misha Moroshko


1 Answers

        grid.onMouseEnter.subscribe(function(e, args) {
            var cell = grid.getCellFromEvent(e)
            var row = cell.row
            var item = dataView.getItem(row);
            //do whatever
        });

        grid.onMouseLeave.subscribe(function(e, args) {
            //do whatever
        });

cell, row and item are just examples for how to get to data

like image 154
Dmitry Grinberg Avatar answered Sep 27 '22 22:09

Dmitry Grinberg