SlickGrid setting row opacity

北慕城南 提交于 2019-12-03 09:10:55

Just in case anyone else is trying to do something similar, I added a post render event by doing the following: Added a new method to the API section of SlickGrid and then subscribed to that method and implemented the jQuery to updated the opacity. I then triggered the method inside the render() method of SlickGrid.

To be a bit more clear:

In the slick.grid.js in the "Public API" section i added a new event:

"onPostRenderJob": new Slick.Event(),

I then updated the render() function in the same file:

function render() {
        // all the standard code here...
        trigger(self.onPostRenderJob);
    }

In the page that configures the grid i subscribed to the event:

 grid.onPostRenderJob.subscribe(function(e, args) {
                $('img[src="slickgrid/images/tick.png"]').parent().parent().css('opacity', '0.4');
            });

This accepted answer is absolutely wrong, but I don't blame the author since this was posted over 2 years ago and on for a really old version of SlickGrid.

Please see https://github.com/mleibman/SlickGrid/wiki/Providing-data-to-the-grid for information on how to do this properly without killing performance.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!