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