-3

詳細は次のとおりです。

http://www.sencha.com/forum/showthread.php?194117-how-set-selected-row-in-default-when-load-gridpanel-using-checkbox-selection-model

前もって感謝します!!!

4

2 に答える 2

2

より良いソリューションは常に歓迎されます!!!

grid.getStore().load({

scope:this,

callback: function (records, operation, success) {
    if(success){

        /*var store = grid.getStore();
        var records = [];
        store.queryBy(function(record,id){

            if(record.data.chkd){
                    records.push(record);
                }

            console.log(id);

        },this);

        grid.getSelectionModel().select(records,false,false);
        */
          var sm = grid.getSelectionModel();
          Ext.each(records, function(record) {
              if(record.data.chkd){
                var row = record.index;
                sm.select(row, true);
              }
      });



    }else{

        //alert(success);
        //console.log(operation.exception);
    }
}}
);
于 2013-04-03T09:34:00.930 に答える