2013年12月18日星期三

jqGrid cell contents how to set the font color of its contents ?

You greatly, I was a novice , today's encounter a problem, customer lists some of the cells displayed content requirements are not the same as the color of the font , I use jqGrid control, I ask you this question is how to solve ?
------ Solution ---------------------------------------- ----
not sounded drifting
------ For reference only ------------------------- --------------
landlord solved?
------ For reference only -------------------------------------- -
encounter the same problem, solving
------ For reference only ---------------------------- -----------
plus cellattr in colModel in
such as:
 colModel: [
                {
                    name: '列名称',
                    index: '列名称',
                    width: 65,
                    sortable: true,
                    resizable: false,
                    cellattr: addCellAttr
                }]

then add addCellAttr methods
function addCellAttr(rowId, val, rawObject, cm, rdata) {
 if (条件) {
                    return "style='color:red'";
                }
}

------ For reference only ----------------------------------- ----
in this cell value plus multi- styles. Such as : ' Subtotal '. ' Subtotal ' is the value.
effect shown
------ For reference only ----- ----------------------------------
4 F is a positive solution
------ For reference only ---------------------------------------
thank the fourth floor ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

没有评论:

发表评论