ext_GridPanel1_삼

2355 단어 gridPanel
Ext.onReady(function(){
	// 
	var cm = new Ext.grid.ColumnModel([
	   new Ext.grid.RowNumberer(),
	  {header: " ", width: 80, dataIndex: "Name", tooltip: " "},
	  {
		  header: " ", 
		  width: 40, 
		  dataIndex: "Sex", 
		  align: "center",
		  renderer: function(v){
			  if(v == " "){
				  return "<img src='../img/drop-yes.gif'>"
			  } 
			  return "<img src='../img/drop-no.gif'>"
		  }
	  },
	  {
		  header: " ", 
		  width: 150, 
		  format: "Y-m-d", 
		  dataIndex: "Birthday",
		  renderer: Ext.util.Format.dateRenderer("Y-m-d")
	  },
	  {header: " ", width: 80, dataIndex: "Education", align: "center"},
	  {id: "memo", header: " ", dataIndex: "Memo"},
	  {
		  header: " ",
		  width: 150,
		  dataIndex: "",
		  menuDisabled: true,
		  renderer: function(v){
			  return "<span style='margin-right: 10px'><a href='#'> </a></span><span><a href='#'> </a></span>";
		  }
		  
	  }
	]);
	
	// 
	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);

좋은 웹페이지 즐겨찾기