我在录入数据后点击保存后combo的显示就出现了这种情况。感觉render很有问题。跪求大侠指点,敢问为什么会出现这种情况呢?Yyqkhzlr.comboBoxRenderer = function(combo) {
   return function(value) {
   var idx = combo.store.find(combo.valueField, value);
   var rec = combo.store.getAt(idx);
   return (rec == null ? value : rec.get(combo.displayField));
   };
  
}Ext JS

解决方案 »

  1.   

    你alert下看看那个函数被回调了几次。
      

  2.   

    在google上找了代码,貌似还没大明白。不过问题是解决了 //渲染editegridpanel中的combox
    Yyqkhzlr.comboBoxRenderer = function(combo, grid) {
       return function(value) {
       var combo = this.getEditor();
       if (combo.store.getCount() == 0) {
       combo.store.on('load', refreshGrid, grid, {
       // tried this, still hangs. i've also tried 'single: true'
       buffer: 1000
       }); 
       }  
       // just for easy code reading, split out the refresh
       function refreshGrid() {
       grid.getView().refresh();
       }
       var idx = combo.store.find(combo.valueField, value);
       if (idx == -1) {
       return value;
       }
       var rec = combo.store.getAt(idx);
       return (rec == null ? '' : rec.get(combo.displayField));
       };
      
    }