Author Topic: Formula not working set colmodel after grid initialization  (Read 1923 times)

Kayser

  • Newbie
  • *
  • Posts: 7
    • View Profile
Formula not working set colmodel after grid initialization
« on: November 22, 2016, 10:40:29 am »
Hi everyone,
New colmodel option "formula" not working after grid initialization. When I set colmodel dynamically,  any column's formula option can't load.

Example:
var obj = {colModel:[{title:"#"}]};

$("selector").pqGrid(obj);

Actually  bottom colModel comes from an ajax response;

var colModel = [{title:"1.Column",dataIndx:1, dataType:"integer" }, {title:"2.column", dataIndx:2, dataType:"integer", formula: function(ui) {return ui.rowData[1]*10;}}]

$("selector").pqGrid("option","colModel", colModel); // <= In here formula not load

I have to set colModel like this . Do you have any idea?

Thanks in advance.