1
votes

My gridpanel is reading it's colmodel from the json upon first load. Everything is fine except that renderer is not working.

The Json return from server:

,"colModel":[
{"header":"Reg. Id","dataIndex":"RegId","sortable":true},
{"header":"Reg. Date","dataIndex":"RegDT","sortable":true,"renderer":"Ext.util.Format.dateRenderer('d-m-Y H:i:s')"}
]

Javascipt handling the loading of colModel:

    var tempConfig = Store.reader.jsonData.colModel;
    colModel.setConfig(tempConfig,true);
    registrationGrid.reconfigure( registrationStore, colModel ) ;

Thanks in advance.

1

1 Answers

1
votes

Ext.util.Format.dateRenderer('d-m-Y H:i:s') returns a function, but if you put it inside "" it will be treated as a string (so no renderer). Just remove ""

"renderer":Ext.util.Format.dateRenderer('d-m-Y H:i:s')