Hybrid 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.

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

      0  

    Default


    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.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi