In ExtJs Grid we can select the first row when the grid is loaded.
Sencha Extjs grid. we can do it as store load callback like this.
Now am getting the grid from my view.
Sencha Extjs grid. we can do it as store load callback like this.
Now am getting the grid from my view.
var myGridstore = this.getViewModel().getStore('myStore');
var myGrid = this.getView().down('grid');
myGridstore.load({
callback: function(records, operation, success, response) {
if(success){
//Grid row index start from Zero.
myGrid.getSelectionModel().select(0);
}
}});
No comments:
Post a Comment