表格加载后默认选中第一行,并可键盘导航

 

 

 

 

代码
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});

 

posted @ 2010-08-14 13:37  meetrice  阅读(946)  评论(1编辑  收藏  举报