PDA

View Full Version : can't get expandRow to work with RowExpander



andynuss
2 Nov 2009, 7:52 AM
Hi,

I'm playing around with the grid-plugins.js example in the grid folder of extjs examples.

I wanted to see if I could initially have some rows expanded on 'render', so I added this to the config for the grid:



listeners : {
render : function (p) {
for (var i = 0; i < 3; i++) {
expander.expandRow(i);
}
},
single : true
},


This code causes an error "undefined" row in the expandRow function as reported by firebug, and the causes seems to be that the html of the row is the wrong type and so the internal isRow() function returns false. I looked at another poster's question, and tried registering an event outside the config, and that didn't help either.

Andy

andynuss
2 Nov 2009, 7:53 AM
By the way, it was the first example grid example in the grid-plugins example.

chunts
13 Nov 2009, 7:21 AM
Did you ever find an answer to this? I am dealing with the same issue of wanting rows expanded by default.

andynuss
13 Nov 2009, 9:33 AM
No, never got an answer. But found that if some time after render, user triggers an event that causes me to want to expand a row, that does work. I just can't expand onrender.