2
votes

I am using ExtJS 4.1. I want to capture the time required to load data into an grid panel. For this, I have added listener on beforerender event and afterrender event of grid but afterrender event is fired before data is loaded and displayed into the grid.

So I am not able to capture the actual time needed to load the data. I saw this similar question on SO but it didn't helped me. As mentioned in that question, load event of store does not help because load event of store fires before that data is rendered into cells of grid.

So can anyone please tell how to capture the exact time required to load data into grid?

1

1 Answers

2
votes

Well all events you are interested in get fired by the view and not by the grid. I think the following events are interesting for you:

  • beforerefresh fired before the rendering of the content starts
  • refresh fired when the rendering of the content finished


viewConfig: {
    listeners: {
        beforerefresh: function() {
            alert('before');
        },
        refresh: function() {
            alert('on(after)')
        }
    }
}