2013-09-30 39 views
1

我有一个网格列的组合框编辑器。它也是可编辑的。组合框的商店具有autoLoad配置,设置为false意味着当用户单击组合框时,商店被加载。如果我没有在组合框中输入任何内容并点击它,它会正常工作。但是,如果我在组合框中首先键入某个内容,然后单击外部,然后再次单击组合框以加载下拉列表,它根本不显示。它只显示加载,然后不显示下拉菜单。ExtJS combobox没有渲染

这是一个非常奇怪的问题,因为我对其他列也有类似的组合框,并且工作正常,但它们不可编辑。

这是否与可编辑配置有关?

var contextDropDownStoreforFactGrid = Ext.create('Ext.data.Store', { 
    fields: [{name:'context',type:'string'}], 
    proxy: { 
     type: 'ajax', 
     url: context + '/FcmServlet', 
     extraParams: { 
      'action': 'getContextDropDownValues' 
     }, 
     reader: { 
      type: 'json' 
     } 
    }, 
    autoLoad: false /* load the store only when combo box is selected */ 
}); 

    editor: { 
       xtype: 'combo', 
       store: contextDropDownStoreforFactGrid, 
       qureyMode: 'remote', 
       id: 'fact_contextId', 
       displayField:'context', 
       valueField: 'context', 
       vtype: 'alphanum', 
       listeners: { 
        beforeQuery: function(query) { 
         if (contextDropDownStoreforFactGrid.getCount() != 0) { 
          contextDropDownStoreforFactGrid.removeAll(); 
          contextDropDownStoreforFactGrid.load(); 
         } 

        } 
       } 
      }, 
       renderer: function(value) { 
       var index = contextDropDownStoreforFactGrid.find('context', value); 
       if (index != -1) { 
        return contextDropDownStoreforFactGrid.getAt(index).data.context;    
       } 
       return value; 
      } 
+0

提供您的代码。 – kuldarim

+0

我已经添加了我的代码,即使我删除了渲染器,它仍然存在相同的问题。 –

回答

0

你有拼写错误在你的组合框配置:

qureyMode: '远程',

应该

queryMode: '远程',

这可能会导致组合框无法从商店加载数据。

+0

不,我修正拼写并再次尝试,仍然是同一个问题 –