SlickGrid setting row opacity

后端 未结 2 1985
抹茶落季
抹茶落季 2021-02-11 09:27

I am using SlickGrid and am wondering if there is a way to set and keep a rows opacity or css styles in general.

For example my rows have a checkbox in them and when the

2条回答
  •  别那么骄傲
    2021-02-11 10:22

    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');
                });
    

提交回复
热议问题