EXTJS 3.4 graidpanel 中 combox 的用法

来源:互联网 发布:女s网络调教男m的任务 编辑:程序博客网 时间:2024/06/02 18:48

在graidpanel,如果增加一行,有些内容需要点击通过下拉框获取值

我用两种方法写了一下store(ps:其实是一种)

第一种:store

 var channelStore = new Ext.data.Store({     proxy:new Ext.data.HttpProxy({url:"../../cccAction.do?actionType=CCCCombo"}),     reader:new Ext.data.JsonReader({ root: 'data', // totalProperty: 'totalCount',  fields: [  { name: 'id',mapping : 'id'},  { name: 'name',mapping : 'name'}  ]      })     });  channelStore.load();

第二种jsonStore

    var channelStore = new Ext.data.JsonStore({  url:"../../chanelAjaxAction.do?actionType=ChanelCombo",  autoLoad: true,   root:'data',  fields: [ { name: 'id',mapping : 'id'}, { name: 'name',mapping : 'name'} ]      });

在应用时:

  { header: '频道名称', dataIndex: 'crtw_grid02_channelName', sortable: false,editor : new Ext.form.ComboBox({//              store : [['d','d'],['a','a']]              store :channelStore,              displayField: 'name',               valueField: 'name',               forceSelection: true,               selectOnFocus: true, //              typeAhead: true, //              triggerAction: 'all',               mode: 'local'//必不可少                            ) }


0 0
原创粉丝点击