0

There's similar question here, but using cellatrr for whole column is quite overloaded. I know there's classes attribute, but it can be only set by static text. I would like to use a function instead like:

$("#jqgrid").jqGrid({ 
...
colModel:
[
{
name:'a',
index:'a',
classes: function() {
return (a < b ? "ui-state-error" : "ui-state-highlight");
}
]
});

Any ideas? Of course without modding jqGrid core :)

Community
  • 1
  • 1
Wooya
  • 23
  • 4
  • So you want a class on a cell or on a column if a value is found? – Mark Mar 14 '13 at 12:53
  • It's a example. I wonder is any way to pass function in "classes" method instead of static text – Wooya Mar 14 '13 at 20:10
  • But do you want the whole column to have the class applied or just the cell? I am asking so I can answer your question.... – Mark Mar 14 '13 at 20:34
  • @Mark: I would like to add class to whole column. Currently I'm doing it by cellatrr method but it takes to much time to do by each cell in col. – Wooya Mar 21 '13 at 12:24

1 Answers1

0
'title'=>'Name',
'name'=>'name',
'classes'=>'your class'

may be you can useful. check below link

http://guriddo.net/documentation/php/_2v70w5p2k.htm