PDA

View Full Version : Custom row renderer in paging grid causes toolbar to vanish



steve.neill
30 Nov 2006, 10:11 PM
It appears that a grid with paging, a custom grid row renderer will cause the paging toolbar to vanish.

Am I doing something wrong or is this a bug?

Thanks,
Steve



// create the grid object
mygrid = new YAHOO.ext.grid.Grid('grid', dm, cm);

// custom row renderer
mygrid.view = new YAHOO.ext.grid.GridView();
mygrid.view.renderRow = function(dataModel, row, rowIndex){
YAHOO.ext.grid.GridView.prototype.renderRow.apply(this, arguments); // pass all args
};

mygrid.render();

steve.neill
30 Nov 2006, 10:32 PM
Infact, the following simpler code fragment will break it...


mygrid.view = new YAHOO.ext.grid.GridView();

steve.neill
30 Nov 2006, 11:06 PM
Silly me! I need to be using PagedGridView()! ... one more step up the learning curve :roll:



this._grid.view = new YAHOO.ext.grid.PagedGridView();

jack.slocum
1 Dec 2006, 5:20 AM
:)