How to call custom js function on scroll in Dojo OnDemandGrid?

162 views Asked by At

We are using dojo OnDemandGrid. I need to call a js method when I scroll down and more records are loaded in the Grid.

This is what I have tried so far.

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

});

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

}); 
1

There are 1 answers

0
Ken Franqueiro On BEST ANSWER

There isn't anything exposed per se for this, but you should be able to aspect after the _processScroll method, which is what is called in response to the grid's viewport scrolling.

The _processScroll method itself determines whether more data needs to be loaded. If it doesn't need to load anything, its return value should be undefined.