i have situvation where i have to call the grid data load function
ds.load({params:{start: 0, limit: 50}});
from a function outside Ext.onReady as show below is sample code.
Any help how to call a function inside EXT.onReady...
Thanks in Advance.
-Deepen
#############################
function removerid(x)
{
alert(x);
ds.load({params:{start: 0, limit: 50}}); // I am unable call DS from ouside EXT
}
Ext.onReady(function(){
Ext.QuickTips.init();
// Ext.form.Field.prototype.msgTarget = 'side';
///////////////////////////////////////////////////
function removerid(x){
var grid ;
if(grid = Ext.getCmp('myGrid') && grid.rendered ){ //may not be rendered yet.
grid.getStore().load({params:{start: 0, limit: 50}});
}
}
we need to use
id : mygrid
and not with :: var mygrid = new Ext.grid.GridPanel({
but with
var mygrid = new Ext.grid.GridPanel({
id : 'mygrid'
Thanks one again.
var grid;
if(grid = Ext.getCmp('budgetGrid') && grid.rendered()){ //may not be rendered yet.
grid.getStore().reload();
grid.doLayout();
}
This works fine for me:
var grid;
if(grid = Ext.getCmp('budgetGrid') && grid.rendered()){ //may not be rendered yet.
grid.getStore().reload();
grid.doLayout();
}
#If you have any other info about this subject , Please add it free.# |