ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: dbadmin on November 17, 2014, 08:48:59 pm

Title: Column style applies to header automatically in 2.2.0
Post by: dbadmin on November 17, 2014, 08:48:59 pm
Is there any way to prevent it? Is it intended behavior or a bug?

I'd like to highlight cells in a column with a specific background color, but I'd like the header background to be the same all the time (default)
Title: Re: Column style applies to header automatically in 2.2.0
Post by: paramvir on November 17, 2014, 09:13:35 pm
It depends upon how the css rule for the class is written:

This applies to grid body cells only
Code: [Select]
tr.pq-grid-row td.someClass {
  background: beige;
}

This applies to grid body cells as well as header cell.
Code: [Select]
tr td.someClass {
  background: beige;
}
Title: Re: Column style applies to header automatically in 2.2.0
Post by: dbadmin on November 22, 2014, 12:42:26 am
That solved it!  Thanks.
Title: Re: Column style applies to header automatically in 2.2.0
Post by: paramvir on May 27, 2015, 09:57:55 am
If it's required to change style / apply css to header cells only, it can also be done with help of css.

tr.pq-grid-title-row > .pq-grid-col{
    background: pink;
}
tr.pq-grid-title-row > .pq-grid-col.green{ /* here green class is added in colModel definition */
    background: lightgreen;
}


Example:
http://jsfiddle.net/paramquery/qe1yur0L/1/