grid.getStore().getRange(0,store.getCount());    //得到grid所有的行 

 

grid.getSelectionModel().getSelections();        //得到选择所有行     
//
注:如果不声明var sm = new Ext.grid.CheckboxSelectionModel();则会报此句没有该对象或属性
Var selectRows = grid.getSelectionModel().getSelections();
selectRows[
0].get(“gird中某列的dataIndex属性值”)        //取选中行记录的某列的值

 

grid.selModel.selections.items;              //得到选择所有行 

 

grid.getSelectionModel().getSelected();      //得到选择行的第一行 

 

// 单击gird中某一行时取得该行的数据
proLevelGrid.on('rowclick'function(proLevelGrid,rowIndex,event){
    
var record = proLevelGrid.getStore().getAt(rowIndex);
    addProductLevel_form.getForm().loadRecord(record);
    alert(record.get(
'id'));
});

 

var grid1_RowClick = function(a,b,c){
    
// 获取列某一特定列的数据
    var id = a.getStore().getAt(b).get("Id");
}

 

 

posted on 2011-01-14 02:21  肉肉哥哥  阅读(11631)  评论(0编辑  收藏  举报