I've a grid in ExtJS 4.2 and I need to set default renderer for its columns by type. It means that I've a renderer function for each grid column type (a renderer for Boolean
columns, another for Date
columns, another for Number
columns, etc) and I want to change default renderer by column type globally (I can't set it individually for each grid column because I can't change legacy code).
Any idea?
Asked
Active
Viewed 1,697 times
1

Michel
- 571
- 1
- 4
- 19

Ehsan Khodarahmi
- 4,772
- 10
- 60
- 87
2 Answers
2
Just some links:
- Best practice for overwriting classes properties
- Steps to overriding Sencha ExtJS standard component functionality
- Overriding Extjs classes and invoking callParent
You should overwrite the Boolean column type (and other also) once and it (they) will be used everywhere.
2
use this override for boolean column and same this code for other column type :
Ext.define('MyBooleanColumn',{
override: 'Ext.grid.column.Boolean',
renderer:function(v){
// write your own customization code here
return v;
}
});

mrlayeghi
- 113
- 8