ext_GridPanel1_4

1315 ワード

	//Record       
	var Human = Ext.data.Record.create([
	   {name: "Name", type: "string", mapping: "name"},
	   {name: "Sex", type: "string", mapping: "sex"},
	   {name: "Birthday", type: "string", mapping: "birthday"},
	   {name: "Education", type: "string", mapping: "edu"},
	   {name: "Memo", type: "string", mapping: "memo"}
	]);
	
	//Reader
	var reader = new Ext.data.JsonReader({}, Human);
	
	//store
	var store = new Ext.data.Store({
		proxy: proxy,
		reader: reader
	});
	store.load();
	//     dataIndex   Human    name       ,             。
    //             ,       GridPanel        GridPanel      
	//     GridPanel     ,      
	var grid = new Ext.grid.GridPanel({
		title: "    ",
		width: 600,
		autoHeight: true,
		cm: cm,
		store: store,
		renderTo: "a",
		autoExpandColumn: "memo" //    ,      
	});
	//    Ext.Panel        ,      autoExpandColumn  ,      ,    
	//       ,     ,autoExpandColumn          id   ,       ,”  “    
	//    ,    id  ,    
});