如何在dojo dgrid完全渲染时调用事件?

时间:2015-06-09 04:16:26

标签: dojo dgrid

我们正在使用dojo而不是分页并立即显示所有记录。我们需要在整个网格完全渲染时调用java脚本方法,以便网格行和单元格可用于DOM操作。

我正在尝试使用代码,但它无效。

aspect.after(grid,"dgrid-refresh-complete",function(){

});

grid.on("dgrid-refresh-complete", function(event){

}); 

1 个答案:

答案 0 :(得分:1)

Jun 10, 2015 8:49:27 AM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization completed in 746 ms INFO: Loading XML bean definitions from class path resource [pizza-context.xml] Jun 10, 2015 8:49:36 AM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization completed in 460 ms INFO: Loading XML bean definitions from class path resource [servlet-context.xml] 专门在dgrid-refresh-completeOnDemandList中实施。如果您正在使用Pagination mixin(如0.30.4教程中所述),则可以采用以下相同类型的事件:

SingleQuery

因此,例如,在0.3中,SingleQuery的var self = this; // existing code from refresh... // when(...) (via dojo/when) should only be necessary here for dgrid 0.3 var promise = when(this._trackError(/* existing code from refresh */)); promise.then(function () { on.emit(self.domNode, 'dgrid-refresh-complete', { bubbles: true, cancelable: false, grid: self }); }); return promise; 方法看起来像这样:

refresh