renderTo,把panel,添加到div

解决方案 »

  1.   

    Ext.onReady(GridBasic);  GridBasic不需要()
      

  2.   

    sencha touch 我觉得是你需要的
      

  3.   

    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [
            { text: 'Name',  dataIndex: 'name' },
            { text: 'Email', dataIndex: 'email', flex: 1 },
            { text: 'Phone', dataIndex: 'phone' }
        ],
        height: 200,
        width: 400,
        renderTo: Ext.getBody()//这里也可以是你的div
    });
      

  4.   

    算了,我结贴了,好像没多少人懂  ext  吧 !感谢回帖的朋友!