Threaded View

    You found a bug! We've classified it as EXTJS-8168 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    4
    Vote Rating
    1
    imc-pp is on a distinguished road

      0  

    Default disable grouping feature does not disable column menu "group by this field"

    disable grouping feature does not disable column menu "group by this field"


    Ext version tested:
    4.1.3.548


    Browser versions tested against:
    FF16

    Description:

    Defining a grid panel and a store like this

    Code:
    var localStore = Ext.create('Ext.data.JsonStore', {
        name: 'localStore',
        fields: ['name', 'data', 'skill'],
        data: [
    { 'name': 'metric one',   'data': 10, 'skill':'skill3' },
            { 'name': 'metric two',   'data':  7, 'skill':'skill3' },
            { 'name': 'metric three', 'data':  5, 'skill':'skill3' },
            { 'name': 'metric four',  'data':  2, 'skill':'skill2' },
            { 'name': 'metric five',  'data': 27, 'skill':'skill1' }
        ]
    });
    
    
    
    var sampleGrid = Ext.create('Ext.grid.Panel', {
        title: 'Sample store',
        store: localStore,
        width: 700,
        height: 700,
        features: [
            Ext.create('Ext.grid.feature.GroupingSummary', {
                id: 'groupSummary',
                groupHeaderTpl: '{name} ({rows.length})'
            })        
        ],
    
        columns: [
    { text: 'name',  dataIndex: 'data', width:300},
    { text: 'skill',  dataIndex: 'skill' }
        ],
        height: 200,
        width: 400,
        renderTo: Ext.getBody()
    });
    I would assume that

    Code:
    sampleGrid.getView().getFeature('groupSummary').disable();
    will disable the grouping feature AND disable the grouping-column Menu ("group by this field")

    However even after using the "disable" method on the feature, the column menu in the grid panel can still be clicked by the user. Thus "disabling" the grouping feature is only possible by iterating over all configured columns and set the "groupable" property to "false"

    Code:
    for (var i in sampleGrid.columns) {
                console.log("disable groupable on column" + sampleGrid.columns[i].dataIndex);
                sampleGrid.columns[i].groupable = false;
    }
    This will then also disable the column menu "Group by this field".
    However I would assume that using the
    Code:
    getFeature('groupSummary').disable()
    I can achieve the same effect without the need to iterate over all defined columns.
    Last edited by imc-pp; 7 Jan 2013 at 5:29 AM. Reason: corrected test case

Thread Participants: 1

Tags for this Thread

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