PDA

View Full Version : [RowExpander] How to expand all rows of grid ?



Charx
14 Mar 2012, 2:17 AM
Hi,
I'm using ext js 4.0.7 and i'm trying to open a window with a grid in it. The grid has the rowexpander plugin that is working, but i have no succes in finding a way to expand all rows by default.
Here's my code:


rlogwin = Ext.create('POCIndicateurs.view.ui.rawlogswin');
rlogwin.show();
var g = Ext.getCmp('Gridrawlogs');
var s = g.getStore();
var expander = g.plugins;
for(i=0; i<s.getCount(); i++){
console.log(expander);
console.log(s.getCount());
expander.toggleRow(i);
}


When executing the code above, debugger says that expander as no method toggleRow.... :-(

droessner
14 Mar 2012, 7:05 AM
Try this:

var expander = g.plugins[0];