extjs apply formatting to grid column -


in extjs, if have grid definition this:

xtype: 'grid', store: 'somestore', flex: 1, frame: true, loadmask: true, titlecollapse: true, cls: 'vline-on', ref: '../somegrid', id: 'somegrid', columns: [            {              xtype: 'gridcolumn',              header: 'id',              dataindex: 'someid',              sortable: true,               width: 100             } 

is there way apply formatting column? example, field number , if wish set decimal precision..can it? or need apply formatting when store being loaded in java file? guess latter??

use "renderer" option. can define function there. example want show someid wrapped in tag:

columns: [        {          xtype: 'gridcolumn',          header: 'id',          dataindex: 'someid',          sortable: true,          width: 100,          renderer: function(value) {              // logic here              return "<b>" + value + "</b>";          }         } 

Comments

Popular posts from this blog

java - netbeans "Please wait - classpath scanning in progress..." -

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -