1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    53
    Vote Rating
    0
    MacSimon is on a distinguished road

      0  

    Default checkboxselectionmodel selectall event

    checkboxselectionmodel selectall event


    Hi everyone,

    I would like to know how to catch the event
    for selecting/deselecting everything.

    I need this because I am using the checkboxselectionmodel in combination with paging
    and therefor need to implement my own logic.

    example of my code:

    Code:
    
    var checkboxSelectionModel = new Ext.grid.CheckboxSelectionModel({
    checkOnly: true
    });
     
    
    var myView = new Ext.grid.GridView({
    id: "myView",
    forceFit: true,
    scrollOffset: 0
    });
     
    
    var myColumnModel = new Ext.grid.ColumnModel({
    defaults: { sortable: true },
    columns: [
    checkboxSelectionModel,
    { header: 'H1', dataIndex: 'C1' },
    { header: 'H2', dataIndex: 'C2' }
    ]
    });
     
    
    var pagingBarForGrid = new Ext.PagingToolbar({
    pageSize: 25,
    store: myStore
    });
     
    
    var myGridPanel = new Ext.grid.GridPanel({
    id: "myGridPanel",
    colModel: myColumnModel,
    store: myStore,
    selModel: checkboxSelectionModel,
    viewConfig: myView,
    bbar: pagingBarForGrid
    });
    
    Thanks for helping

  2. #2
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    6
    Vote Rating
    0
    sabilfikri is on a distinguished road

      0  

    Default


    hi,
    I'm trying to do the exact same thing. I tried using listeneres to catch the 'check' event, but it doesn't seem to work. any help on this?

    this is a piece of my code:
    Code:
    var ChkSelModel = new Ext.grid.CheckboxSelectionModel({
            header: '<div class="x-grid3-hd-checker"> </div>',
            singleSelect: false,
            listeners: {
                'check' : function(r, c) {
                    if (c) {
                        Ext.getCmp(action_id).setDisabled(false);
                    } else {
                        Ext.getCmp(action_id).setDisabled(true);
                    }
                }
            }
        });

  3. #3
    Sencha User
    Join Date
    Mar 2008
    Posts
    566
    Vote Rating
    0
    moegal is on a distinguished road

      0  

    Default


    did you ever figure this out? Seems this would be handy.

    Marty

  4. #4
    Sencha User
    Join Date
    May 2011
    Posts
    1
    Vote Rating
    0
    parchana is on a distinguished road

      0  

    Default


    I don't see any answers to this for a while. Trying to fire the "check" event but it doesn't work. I'm using EXT JS 3.3.1

    Any ideas, please?

  5. #5
    Sencha User
    Join Date
    Sep 2009
    Location
    London
    Posts
    54
    Vote Rating
    1
    harel is on a distinguished road

      0  

    Default Workaround

    Workaround


    For the sake of posterity and history, I'm adding the solution I used here.

    I added the following listener to the selection model:

    Code:
    listeners: {
            		selectionchange: function(sm) { 
            			var allSelected = sm.selections.length >= sm.grid.getStore().getTotalCount();
            			// now handle based on allSelected or the actual selection....
            		}
            	}

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