1

I have a grid with colModel defined as:

colModel: [ 
      ... 
      {name:'price', index:'price', width:60, align:"center", editable: true},
      ...
   ]

After the grid is created I want to bind a custom formatter with the column. How can I achieve that.

Mukesh Ram
  • 6,248
  • 4
  • 19
  • 37
Ekata
  • 259
  • 2
  • 7
  • 21

1 Answers1

0

You can use setColProp method for example to modify some specific column in colModel. You can dynamically modify the most properties inclusive formatter. It's important that the formatter will be used during filling the <tbody> (the data part) of the grid. Thus the modification of the formatter will be seen after the next filling the grid. Thus one can make modification of formatter inside of beforeProcessing callback or one should trigger reloadGrid after the modification. I recommend you to read the old answer for more information and an example of the implementation.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798