Ext.onReady(function()
{ var MyRecord = Ext.data.Record.create([
{name:'DicId'},
{name:'DicType'},
{name:'DicName'},
{name:'ParDicId'},
{name:'DicRe'},
{name:'State'},
{name:'DicA'},
{name:'DicB'},
{name:'DicC'},
{name:'DicD'}
]);
var dataProxy=new Ext.data.HttpProxy({url:"Login.aspx"});
var theReader=new Ext.data.JsonReader({
totalProperty: "results",
root: "rows",
id: "id"
},MyRecord);
var store=new Ext.data.Store({
proxy:dataProxy,
reader:theReader
});
store.load();
new Ext.grid.GridPanel(
{
store:store,
mode:'remote',
title:'权限字典管理',
applyTo:'grid',
width:250,
height:150,
frame:true,
columns:[
{header:"ID",width:50,dataIndex:'DicId',sortable:true},
{header:"字典类型",width:80,dataIndex:'DicType',sortable:true},
{header:"字典名称",width:80,dataIndex:'DicName',sortable:true},
{header:"父级ID",width:80,dataIndex:'ParDicId',sortable:true},
{header:"备注",width:80,dataIndex:'DicRe',sortable:true},
{header:"状态",width:80,dataIndex:'State',sortable:true},
{header:"备用字段A",width:80,dataIndex:'DicA',sortable:true},
{header:"备用字段B",width:80,dataIndex:'DicB',sortable:true},
{header:"备用字段C",width:80,dataIndex:'DicC',sortable:true},
{header:"备用字段D",width:80,dataIndex:'DicD',sortable:true}
]
})
});
{ var MyRecord = Ext.data.Record.create([
{name:'DicId'},
{name:'DicType'},
{name:'DicName'},
{name:'ParDicId'},
{name:'DicRe'},
{name:'State'},
{name:'DicA'},
{name:'DicB'},
{name:'DicC'},
{name:'DicD'}
]);
var dataProxy=new Ext.data.HttpProxy({url:"Login.aspx"});
var theReader=new Ext.data.JsonReader({
totalProperty: "results",
root: "rows",
id: "id"
},MyRecord);
var store=new Ext.data.Store({
proxy:dataProxy,
reader:theReader
});
store.load();
new Ext.grid.GridPanel(
{
store:store,
mode:'remote',
title:'权限字典管理',
applyTo:'grid',
width:250,
height:150,
frame:true,
columns:[
{header:"ID",width:50,dataIndex:'DicId',sortable:true},
{header:"字典类型",width:80,dataIndex:'DicType',sortable:true},
{header:"字典名称",width:80,dataIndex:'DicName',sortable:true},
{header:"父级ID",width:80,dataIndex:'ParDicId',sortable:true},
{header:"备注",width:80,dataIndex:'DicRe',sortable:true},
{header:"状态",width:80,dataIndex:'State',sortable:true},
{header:"备用字段A",width:80,dataIndex:'DicA',sortable:true},
{header:"备用字段B",width:80,dataIndex:'DicB',sortable:true},
{header:"备用字段C",width:80,dataIndex:'DicC',sortable:true},
{header:"备用字段D",width:80,dataIndex:'DicD',sortable:true}
]
})
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货