X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..3789b528d8dd8aad4558e38e22d775bcab1cbd36:/examples/grid/multiple-sorting.js diff --git a/examples/grid/multiple-sorting.js b/examples/grid/multiple-sorting.js index 6797e773..718de4df 100644 --- a/examples/grid/multiple-sorting.js +++ b/examples/grid/multiple-sorting.js @@ -244,13 +244,12 @@ Ext.onReady(function() { renderTo: 'grid-example', listeners: { scope: this, - //here we tell the toolbar's droppable plugin that it can accept items from the columns' dragdrop group - afterrender: function(grid) { - var headerCt = grid.child("headercontainer"), - //the plugin position depends on browser see Ext.grid.header.Container sources - dragProxy = headerCt.plugins[0].dragZone || headerCt.plugins[1].dragZone; - - droppable.addDDGroup(dragProxy.ddGroup); + // wait for the first layout to access the headerCt (we only want this once): + single: true, + // tell the toolbar's droppable plugin that it accepts items from the columns' dragdrop group + afterlayout: function(grid) { + var headerCt = grid.child("headercontainer"); + droppable.addDDGroup(headerCt.reorderer.dragZone.ddGroup); doSort(); } }