ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: paboro on July 02, 2014, 04:46:28 pm
-
Hello, first of all, thanks for this good job that is Paramquery.
I have a problem, in my program, I want to set colors to the rows, depending of some factors. I do it with addClass ( I read it fails) but when I do a event, like resize columns, or scroll, etc... It goes white again. Is really important that colors, so I need to fix this. How can I set the colors even if happen a event, or something. There is a jquery function? or some?
Thanks for your time.
Regards
-
paramquery Grid is frequently refreshed due to its design based on virtual rendering.
If you want to do it with jQuery API, you have to use refresh event to add class so that class remains intact whenever grid is refreshed.
http://paramquery.com/api#event-refresh
-
I actually do, but the first time, when is created it apears in colors because I inicializate it, but in the moment I do a event like resize or scroll it disapear. I have the pqrefresh, and is ok, but only when I refresh with alt+f5 or refresh of browser, but not in the event of the table...
What can I do?
-
Whenever the grid is scrolled, column resized, sorted, etc, refresh event is fired.
I mean you could add the code to add classes within refresh event.
$grid.on("pqgridrefresh", function(evt){
//add classes here
});
-
Thanks, I already did it, but I just now fixed it, my problem was the cache...
Thanks very much
regards