ExtJs의 복잡한 표

1423 단어 ExtJs
 var data=[
			{id:1, name:' ',email:'[email protected]',sex:' ',bornDate:'1991-4-4'},
			{id:2, name:' ',email:'[email protected]',  sex:' ',bornDate:'1992-5-6'},
			{id:3, name:' ',email:'[email protected]',sex:' ',bornDate:'1993-3-7'}
	];
	var store=new Ext.data.JsonStore(
		{
			data:data,
			fields:["id","name","sex","email",{name:"bornDate",type:"date",dateFormat:"Y-n-j"}]
		}
	);
	var colM=new Ext.grid.ColumnModel([
		{
			header:" ",
			dataIndex:"name",
			sortable:true,
			editor:new Ext.form.TextField()
		},
		{
			header:" ",
			dataIndex:"sex"
			//editor:new Ext.form.ComboBox({transform:"sexList",triggerAction: 'all',lazyRender:true})
		},
		{
			header:" ",
			dataIndex:"bornDate",
			width:120,
			renderer:Ext.util.Format.dateRenderer('Y m d '),
			editor:new Ext.form.DateField({format:'Y m d '})
		},
		{
			header:" ",
			dataIndex:"email",
			sortable:true,
			editor:new Ext.form.TextField()
		}
	]);
	var grid = new Ext.grid.EditorGridPanel({
			region:'north',
			title:" ",
			height:200,
			width:600,
			cm:colM,
			autoHeight:true,
			store:store,
			autoExpandColumn:3,
			clicksToEdit:1
	}); 

좋은 웹페이지 즐겨찾기