表格加载后默认选中第一行,并可键盘导航
代码
this.getStore().on({'load': function(){
this.getSelectionModel().selectFirstRow();
var row = this.getView().getRow(0);
Ext.get(row).focus();
this.fireEvent("rowclick",null);
},scope:this});
选中本行后,触发行点击事件。
this.getSelectionModel().on({'rowselect':function(){this.fireEvent("rowclick",null);},scope:this});