struts2 - struts 2 jquery grid plugin change only one column header style -



struts2 - struts 2 jquery grid plugin change only one column header style -

is possible alter style of 1 column heard in grid ?!

the sjg:gridcolumn has cssclass property, setting css applied rows under column, not column header.

at jqgrid - possible alter background color of html header text in javascript? got code as:

in html page. if want create changes 1 column can utilize setlabel method:

$("#mygrid").jqgrid('setlabel','price', '', {'background':'red'});

or

$("#mygrid").jqgrid('setlabel','price', '', 'mycolorclass');

but not create work.

finally, columns headers have unique id, utilize below:

document.getelementbyid("gridtable_samplecolumn").style.backgroundcolor = "#ff0000";

well think there improve way. looking thing this:

<sjg:gridcolumn name="samplecolumn" cssclass="makethissmall" />

and in css

.makethissmall{ font-size : smaller; }

which did not work , alter rows css not column header.

also find gridcolumn has formatoptions looking ?!

there no declarative way set style/class of column header specific column (i exclude definition of css rule id or column name set explicitly). should utilize setlabel set it.

if need alter background color should take in consideration background-image have set none too. additionally should don't forget other css rules applied , rule more specific css selector win. illustration font-size in column header applied because of next rule ui.jqgrid.css:

class="lang-css prettyprint-override">.ui-jqgrid .ui-jqgrid-view { font-size: 11px }

which have two classes in rule. if want alter value columns having makethissmall class should define css rule like

class="lang-css prettyprint-override">.ui-jqgrid .ui-jqgrid-view .makethissmall { font-size: 8px }

or

class="lang-css prettyprint-override">.ui-jqgrid-view .makethissmall { font-size: 8px }

in way should @ to the lowest degree complex or more complex css rule want overwrite.

in same way background applied because of css rule contains 2 classes

class="lang-css prettyprint-override">.ui-widget-content .ui-state-default { background: ... }

so need define corresponding deep (or deeper) css role able ovewrite via class attribute.

struts2 jqgrid struts2-jquery struts2-jquery-grid

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -