View Full Version : Tab panel rendering

14 Jun 2012, 8:19 AM
I have a tabpanel with two tabs. There is a grid in second tab. I am trying to select some rows in this grid on page load. But no rows are getting selected. That is because the contents of second tab are not rendered yet. If i try to select the rows after clicking the second tab, it works fine. Please suggest a solution. I want it to happen on page load only.

14 Jun 2012, 10:42 PM

You can attach a load event on your grid's store and calls a method in that to select rows of your choice.

For example:-

grid.mon(grid.store, 'load', grid.onGridStoreLoad, grid);

onGridStoreLoad: function () {
if (grid.store.getCount() > 0) {
//you can do selections here , for example,
else {
alert('No Records in Grid');