2012-11-09 3 views
0

첫 번째 열이 체크 박스 인 그리드가 있습니다. 체크 박스를 표시해야하지만 때로는 그리드를로드 할 때 체크 박스가 체크되고 때로는 체크되지 않습니다. 누군가 나를 도울 수 있니?ExtJs 체크 박스가 때때로 체크되어서 때때로 나타나지 않습니다.

  var item = record.data; 
      grid.store.load({ 
      callback: function(response){ 
       Ext.each(response, function(records) { 
        Ext.each(item.links, function (valor){ 
         if(records.data.id == valor.id){ 
          var row = records.index; 
          grid.getSelectionModel().select(row); 
         } 
        }); 
       }); 
      } 
     }); 
     form.loadRecord(record); 

답변

0

이벤트는 beforerefresh으로 해결됩니다. 모두에게 감사드립니다.

  var item = record.data; 
      grid.store.load({ 
      callback: function(response){ 
       grid.getView().on('beforerefresh', function(view) { 
        Ext.each(response, function(records) { 
         Ext.each(item.links, function (valor){ 
          if(records.data.id == valor.id){ 
           var row = records.index; 
           grid.getSelectionModel().select(row, true); 

          } 
         }); 
        }); 
       }); 
      } 
     }); 
     form.loadRecord(record); 
관련 문제