maren
18 Aug 2009, 4:24 AM
hi,
i try to load 65000 rows in a datagrid but it doestn't work
although the same code work perfectly with another store (675 rows)
Sphere.mygrid = Ext.extend(Ext.grid.GridPanel, {
initComponent: function() {
var ds = new Ext.ux.data.PagingDirectStore({
paramsAsHash:true,
root:'',
directFn: MenuDirectStore.loadExperienceData,
//idProperty:'id',
fields: [
{name: 'id' },
{name: 'parentId'},
{name: 'value'}
],
paramOrder: ['value'],
baseParams: {value:''},
autoLoad: {params: {value:'', start: 0, limit: 10}}
});
// ds.load({params: {value:'', start: 0, limit: 10}});
var pagingbar= new Ext.PagingToolbar({
pageSize: 10,
store: ds,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No data to display"
});
var config = {
width:700,
height:250,
autoScroll:true,
title:'List Menus',
store: ds,
columns:[{
id: 'menu_id', // id assigned so we can apply custom css (e.g. .x-grid-col-topic b { color:#333 })
header: "menu_id",
dataIndex: 'id',
width: 100
// sortable: true
},{
header: "value",
dataIndex: 'value',
width: 300
//align: 'left'
//sortable: true
}],
loadMask:true,
tbar: [
'Search: ', ' ',
new Ext.ux.form.SearchField({
store: ds,
width:320
})
],
bbar: pagingbar
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
Sphere.mygrid.superclass.initComponent.apply(this, arguments);
},
/* afterRender: function() {
this.getStore().load({params: {value:'', start: 0, limit: 10}});
Sphere.mygrid.superclass.afterRender.apply(this, arguments);
},*/
onRender: function() {
this.getStore().load({params: {value:'', start: 0, limit: 10}});
Sphere.mygrid.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('mygrid', Sphere.mygrid);
//////////List menu Panel////////////////////////////
Sphere.ListMenuPanel = Ext.extend(Ext.Panel, {
initComponent : function() {
Ext.apply(this, {
items : [{xtype: 'mygrid'}]
});
Sphere.ListMenuPanel.superclass.initComponent.apply(this, arguments);
}
});
Ext.reg('ListMenuPanel', Sphere.ListMenuPanel);
thanks
i try to load 65000 rows in a datagrid but it doestn't work
although the same code work perfectly with another store (675 rows)
Sphere.mygrid = Ext.extend(Ext.grid.GridPanel, {
initComponent: function() {
var ds = new Ext.ux.data.PagingDirectStore({
paramsAsHash:true,
root:'',
directFn: MenuDirectStore.loadExperienceData,
//idProperty:'id',
fields: [
{name: 'id' },
{name: 'parentId'},
{name: 'value'}
],
paramOrder: ['value'],
baseParams: {value:''},
autoLoad: {params: {value:'', start: 0, limit: 10}}
});
// ds.load({params: {value:'', start: 0, limit: 10}});
var pagingbar= new Ext.PagingToolbar({
pageSize: 10,
store: ds,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No data to display"
});
var config = {
width:700,
height:250,
autoScroll:true,
title:'List Menus',
store: ds,
columns:[{
id: 'menu_id', // id assigned so we can apply custom css (e.g. .x-grid-col-topic b { color:#333 })
header: "menu_id",
dataIndex: 'id',
width: 100
// sortable: true
},{
header: "value",
dataIndex: 'value',
width: 300
//align: 'left'
//sortable: true
}],
loadMask:true,
tbar: [
'Search: ', ' ',
new Ext.ux.form.SearchField({
store: ds,
width:320
})
],
bbar: pagingbar
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
Sphere.mygrid.superclass.initComponent.apply(this, arguments);
},
/* afterRender: function() {
this.getStore().load({params: {value:'', start: 0, limit: 10}});
Sphere.mygrid.superclass.afterRender.apply(this, arguments);
},*/
onRender: function() {
this.getStore().load({params: {value:'', start: 0, limit: 10}});
Sphere.mygrid.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('mygrid', Sphere.mygrid);
//////////List menu Panel////////////////////////////
Sphere.ListMenuPanel = Ext.extend(Ext.Panel, {
initComponent : function() {
Ext.apply(this, {
items : [{xtype: 'mygrid'}]
});
Sphere.ListMenuPanel.superclass.initComponent.apply(this, arguments);
}
});
Ext.reg('ListMenuPanel', Sphere.ListMenuPanel);
thanks