日期:2014-05-16 浏览次数:20735 次
var roleStore=Ext.create('Ext.data.ArrayStore',{
		 fields:[
		         'id','name'
		         ],
		 proxy:{
			 url:"<{:U('Role/showArrayData')}>",
			 type:'ajax',
		 }
	 }){
		     header:'role',
		     dataIndex:'role',
		     editor:new Ext.form.field.ComboBox({
	                typeAhead: true,
	                triggerAction: 'all',
	                selectOnTab: true,
	                store:roleStore,
	                lazyRender: true,
	                listClass: 'x-combo-list-small'
	            })
		 
		 }[
{
"id": "2",
"name": "副站长"
},
{
"id": "3",
"name": "编辑"
}
]
{
    header:'role',
    dataIndex:'role',
    editor:new?Ext.form.field.ComboBox({
        typeAhead:?true,
        triggerAction:?'all',
        selectOnTab:?true,
        store:roleStore,
        lazyRender:?true,
        displayField: 'name', //
        valueField: 'id',     //加上这两个
        listClass:?'x-combo-list-small'
    })
}{
					xtype: 'gridcolumn',
					dataIndex: 'role',
				editor: {
						xtype: 'combobox',
						displayField:'name',
						valueField: 'id',
						store:roleStore
						}
					}