Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Process after grid was loaded completely using ExtJS

I am using ExtJS to load data to a grid, and I want to add some additional processes after data was put on grid completely.

My context is, after data was put on grid, I will check all rows, and mark some of them as disabled based on a specified condition and put tooltip to row (explain why it is disabled). I tried to use 2 events: 'afterrender' of Grid, and 'load' of grid's store, but they did not work.

Because grid's 'afterrender' was fired when first grid initialization, not concern to data load. store's 'load' was fired when data was prefetch to store (not render on screen), so I cannot get the row <div> to style it as disabled.

So, what is the event to detect when data was loaded and rendered completely on grid? And how can I implement this requirement?

like image 892
Đinh Hồng Châu Avatar asked Jun 27 '12 08:06

Đinh Hồng Châu


1 Answers

Have you tried viewready?

Ext.create('Ext.grid.Panel', {
    // ...
    viewConfig: {
        listeners: {
            viewready: function(view) {
                // ...
            }
        }
    }
});
like image 164
Vasiliy Faronov Avatar answered Jan 01 '23 22:01

Vasiliy Faronov