hi all .
I have some problem realted with grid headers. or may be not...
this is my existing code
Code:
RegionsGrid =Ext.extend(Ext.grid.GridPanel, {
id : 'regions'
,border : false
,store : regionsGridStore
// ,columns : [{header: 'Barev'}]
,enableDragDrop : true
,stripeRows : true
// //,autoExpandColumn : 'name'
,width : 200
,title : 'Regions'
,initComponent: function(){
//
// Ext.apply(this,{
// columns : [{header: 'Name'}]
// });
//
Ext.Ajax.request({
scope:this,
url : '../server/data.php',
method: 'POST',
success: function( result, request ) {
Ext.apply(this,{
columns : [{header: 'Name'}]
});
}
});
RegionsGrid.superclass.initComponent.apply(this, arguments);
}
}); // e/o extend
Ext.reg('regionsGrid', RegionsGrid);
this bring some error with cm...
seems that i cannot apply columns from ajax request.
how i undertand it must work, because i pass 'this' to ajax.request via scope.
realy i want to get column names from ajax request.
when i am applying columns from initComponent it works fine.
I hope you understand what i mean.
Thanks