jquery - How to add class to a cell in jqgrid -


i have following colmodel,

    colmodel:[                         {name:'alertid',index:'alertid', width:0, align:'left', sortable:false,hidden:true, resizable:false},                         {name:'name',index:'name', width:12, sortable:false,  resizable:false, classes:'colcell'},                         {name:'alerttype',index:'alerttype', width:0, align:'left', sortable:false, hidden:true, resizable:false}                 ], 

and class:

    .colcell {             padding-left: 15px         } 

but class not being applied cell.

what doing wrong? 'classes' option available versions?

the jqgrid using 4.1.1.

the reason priority of applying css styles. if open demo youth in internet explorer, starts developer tools pressing of f12 , choose cell (by ctrl+b) colcell not applied see following

enter image description here

so more specific css rule on .ui-jqgrid tr.jqgrow td overwrite css rule. need change rule example

.ui-jqgrid tr.jqgrow td.colcell {     padding-left: 15px; } 

now applied expected. see the demo (column "clients" has left padding 15px):

enter image description here


Comments