var json =[["a","scpower","dazhou小角","县长","dazhou"],
["b","scpower","dazhou小角","县长","dazhou"],
["c","scpower","dazhou小角","县长","dazhou"],
["d","scpower","dazhou小角","县长","dazhou"]];
var cm= new Ext.grid.ColumnModel(
[{id:'id',header: 'ID', width: 50, dataIndex: 'id'},
{header: '权限类型', width: 90, dataIndex: 'type'},
{header: "权限名称", width: 140, dataIndex: 'name'},
{header: "作用", width: 90, dataIndex: 'value'},
{header: "所属模块", width: 120, dataIndex: 'belong'}]);
cm.defaultSortable = true;
this.ds = new Ext.data.Store({
proxy: new Ext.ux.data.PagingMemoryProxy(this.json),
reader: new Ext.data.ArrayReader({},
[{name:'id'},{name:'type'},{name: 'name'},{name: 'value'},{name: 'belong'}])
});
this.ds.load();
var grid = new Ext.grid.EditorGrid('grid', {
ds: this.ds,
cm: cm
// selModel: new Ext.grid.RowSelectionModel({singleSelect:false})
});
grid.addListener('rowdblclick', function(){rowdblclickFn});
grid.render();
},
rowdblclickFn:function(){
this.json=[["a","scpower","dazhou小角","县长","dazhou"],
["b","scpower","dazhou小角","县长","dazhou"],
["c","scpower","dazhou小角","县长","dazhou"]];
this.json=json;
this.ds.reload();
}
代码不一定能运行 但是大概意思是这个意思 就是要想个方法能购让以前grid的四条数据变成 新的3条其他数据 急
MMTTMM
DIEA
慕码人2483693
相关分类