extJs的Grid不显示问题
<script>Ext.onReady(function(){varcm=newExt.grid.ColumnModel([{header:'编号',dataIndex:...
<script>
Ext.onReady(function(){
var cm = new Ext.grid.ColumnModel([
{header:'编号',dataIndex:'id'},
{header:'名称',dataIndex:'name'}
]);
var data1 = [
['1','java'],
['2','.net']
];
var ds = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(data1),
reader: new Ext.data.ArrayReader({},[
{name:'id'},
{name:'name'}
])
});
ds.load();
var grid = new Ext.grid.GridPanel({
el:'grid',
ds:ds,
cm:cm
});
});
</script> 展开
Ext.onReady(function(){
var cm = new Ext.grid.ColumnModel([
{header:'编号',dataIndex:'id'},
{header:'名称',dataIndex:'name'}
]);
var data1 = [
['1','java'],
['2','.net']
];
var ds = new Ext.data.Store({
proxy: new Ext.data.MemoryProxy(data1),
reader: new Ext.data.ArrayReader({},[
{name:'id'},
{name:'name'}
])
});
ds.load();
var grid = new Ext.grid.GridPanel({
el:'grid',
ds:ds,
cm:cm
});
});
</script> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询