Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Threaded View

  1. #1
    Sencha User
    Join Date
    Jan 2008
    Posts
    19
    Answers
    1
    Vote Rating
    0
    loginfabio is on a distinguished road

      0  

    Default Answered: GridPanel, try to 'multiselect' rows by code, but only the last is selected

    Answered: GridPanel, try to 'multiselect' rows by code, but only the last is selected


    Hello,

    I have a gridpanel in a form with a CheckboxModel, when I load the store, I have a callback that find the requested records and selects the rows, but I found that only the last record is selected.
    I try adding 'multiSelect: true, simpleSelect: true' in the grid configuration, but result doesn't change.

    Here's some code

    GRIDPANEL view:
    PHP Code:
    Ext.define('Smqs.view.knowledgebase.KlbGroupGrid', {
        
    extend'Ext.grid.Panel',
        
    requires: ['Ext.selection.CheckboxModel'],
        
    alias'widget.smqs-klbgroupgrid',id:'klbgroupgrid',
        
    height154,
        
    multiSelecttruesimpleSelecttrue,
        
    store:'Groups',
        
    viewConfig:{enableRowBody:true},
        
    initComponent: function(){
            var 
    me this,
            
    aColumns = [
                    {
    text'NAME'width:'95%'dataIndex:'GRNO'}
                ],
            
    sm Ext.create('Ext.selection.CheckboxModel', {mode 'MULTI'});
            
    Ext.apply(this,{selModelsmcolumnsaColumns});
            
    this.callParent();
        }
    }); 
    WINDOW controller (init - show)
    PHP Code:
    Ext.getStore('Groups').load({
        
    callback: function (recordsoperationsuccess) {
            var 
    vire val.down('form').down('#klbgroupgrid').getView();
            
    vire.select(0);
            
    vire.select(1);
            
    vire.select(2);
            
    //for (var i=0;i<nure;i++) {
            //    var rowIndex = this.find('GRID', parseInt(arre[i]));
            //    if (rowIndex>=0) {
            //        vire.select(rowIndex);
            //    }
            //}
        
    }
    }); 
    I've commented the loop and forced to select the first three rows and
    only the 3rd row results selected.

    Thanks in advance

  2. Sorry...

    I haven't read documentation completely, I've changed code to:
    PHP Code:
    Ext.getStore('Groups').load({
        
    callback: function (recordsoperationsuccess) {
            var 
    vire val.down('form').down('#klbgroupgrid').getSelectionModel();
            
    vire.select(0,true);
            
    vire.select(1,true);
            
    vire.select(2,true);
            
    //for (var i=0;i<nure;i++) {
            //    var rowIndex = this.find('GRID', parseInt(arre[i]));
            //    if (rowIndex>=0) {
            //        vire.select(rowIndex);
            //    }
            //}
        
    }
    }); 
    and it works.