carstep
14 Oct 2010, 1:36 AM
Hi there,
I extended the gridPanel components as the following:
InterPont.Hitel.UgynokLejelentoGrid = function( config )
{
InterPont.Hitel.UgynokLejelentoGrid.superclass.constructor.call(this,config);
}
Ext.extend( InterPont.Hitel.UgynokLejelentoGrid, Ext.grid.GridPanel, {
initComponent: function()
{
var ds = new Ext.data.JsonStore({
url: 'return JSON string'
,storeId: 'stUgynokok'
,root: 'ugynokok'
,fields: [
{name: 'ID', type: 'string'}
,{name: 'Nev', type: 'string'}
,{name: 'Iroda', type: 'string'}
]
});
// var sm = new InterPont.ux.CtrlCheckboxSelectionModel();
var sm = new Ext.grid.RowSelectionModel({singleselect:false});
var columns = [
// sm,
{header: 'Ügynök neve', dataIndex: 'Nev', sortable: true, resizable: true}
,{header: 'Iroda', dataIndex: 'Iroda', sortable: true}
];
Ext.apply( this, {
store: ds
// ,cm: new Ext.grid.ColumnModel( columns )
,columns: columns
// ,sm: sm
});
InterPont.Hitel.UgynokLejelentoGrid.superclass.initComponent.apply(this,arguments);
}
});
using it the following way:
var grid = new InterPont.Hitel.UgynokLejelentoGrid({
id: 'gridUgynokLejelento',
bbar: [intezetek,{
text: 'Sz?rés'
,handler: this.filterByIntezetek
},'->',{
text: 'Generál'
,handler: this.generateExcel
,scope:this
},'|',{
text: 'PSZAF formátum'
,handler: this.generatePSZAF
,scope:this
}]
});
Ext.StoreMgr.get('stUgynokok').load();
Whatever I change or do the sorting doesn't work anymore. This is the simplest example I could cut off the code.
Does anybody know where to look further?
This code worked well in 3.2.x
r. Sandor
I extended the gridPanel components as the following:
InterPont.Hitel.UgynokLejelentoGrid = function( config )
{
InterPont.Hitel.UgynokLejelentoGrid.superclass.constructor.call(this,config);
}
Ext.extend( InterPont.Hitel.UgynokLejelentoGrid, Ext.grid.GridPanel, {
initComponent: function()
{
var ds = new Ext.data.JsonStore({
url: 'return JSON string'
,storeId: 'stUgynokok'
,root: 'ugynokok'
,fields: [
{name: 'ID', type: 'string'}
,{name: 'Nev', type: 'string'}
,{name: 'Iroda', type: 'string'}
]
});
// var sm = new InterPont.ux.CtrlCheckboxSelectionModel();
var sm = new Ext.grid.RowSelectionModel({singleselect:false});
var columns = [
// sm,
{header: 'Ügynök neve', dataIndex: 'Nev', sortable: true, resizable: true}
,{header: 'Iroda', dataIndex: 'Iroda', sortable: true}
];
Ext.apply( this, {
store: ds
// ,cm: new Ext.grid.ColumnModel( columns )
,columns: columns
// ,sm: sm
});
InterPont.Hitel.UgynokLejelentoGrid.superclass.initComponent.apply(this,arguments);
}
});
using it the following way:
var grid = new InterPont.Hitel.UgynokLejelentoGrid({
id: 'gridUgynokLejelento',
bbar: [intezetek,{
text: 'Sz?rés'
,handler: this.filterByIntezetek
},'->',{
text: 'Generál'
,handler: this.generateExcel
,scope:this
},'|',{
text: 'PSZAF formátum'
,handler: this.generatePSZAF
,scope:this
}]
});
Ext.StoreMgr.get('stUgynokok').load();
Whatever I change or do the sorting doesn't work anymore. This is the simplest example I could cut off the code.
Does anybody know where to look further?
This code worked well in 3.2.x
r. Sandor