ext_GridPanel2_5

1715 단어 gridPanel
	// 
	var data  = [
	    {
		   name: " ",
		   sex: " ",
		   birthday: Date.parseDate("1979-04-11", "Y-m-d"),
		   edu: " ",
		   memo: " "
	   },
	    {
		   name: " ",
		   sex: " ",
		   birthday: Date.parseDate("1987-08-06", "Y-m-d"),
		   edu: " ",
		   memo: " "
	   },
	    {
		   name: " ",
		   sex: " ",
		   birthday: Date.parseDate("1980-05-12", "Y-m-d"),
		   edu: " ",
		   memo: " "
	   },
	    {
		   name: " ",
		   sex: " ",
		   birthday: Date.parseDate("1980-12-11", "Y-m-d"),
		   edu: " ",
		   memo: " "
	   },
	];
	
	//Proxy
	var proxy = new Ext.data.MemoryProxy(data);
	
	//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();
	
	
	

좋은 웹페이지 즐겨찾기