templates - ExtJS 4 - grid column tpl implementation -


i'm trying add string "item " every row under "item no." column in standard extjs 4 grid.

i've attempted

confirmationgrid = ext.create('ext.grid.panel', {     id: 'confirmationgrid',     width: 1100,     renderto: ext.get('sencha_confirmation'),     store: store,     columns: [         {text: 'item no', width: 80, dataindex: 'itemno', tpl: 'item {itemno}' }         // additional columns removed brevity     ] }); 

and references (store, model) item number itemno (as above). column ignoring tpl stipulation , displaying item number without additional text.

where going wrong?

you can use renderer desired result in column:

       {             text: 'item no',             width: 80,             dataindex: 'itemno',             renderer: function(value) {                 return 'item: ' + value;             }         } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -