-
14 Jun 2012 8:19 AM #1
Tab panel rendering
Tab panel rendering
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 #2
Hi!
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:-
Code:grid.mon(grid.store, 'load', grid.onGridStoreLoad, grid);
Code:onGridStoreLoad: function () { if (grid.store.getCount() > 0) { //you can do selections here , for example, grid.selModel.selectFirstRow(); } else { alert('No Records in Grid'); } }sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.


Reply With Quote