1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    7
    Vote Rating
    0
    Answers
    1
    bk.dbe is on a distinguished road

      0  

    Default Answered: Enable/Disable 'grouped' property in List after creation ?

    Answered: Enable/Disable 'grouped' property in List after creation ?


    Hi all,

    I'm working with Sencha Touch 1.1.0, and I have an issue with the List component and the grouped property.
    I have a store which is plugged on my list, and rows are grouped with a particular field : works perfectly. But I would be able to programmatically disable grouping (when a user click on a button for example), after the list is created and rendered.

    I tried to set the grouped property to false in my handler and refresh the view after (see the code below), but it doesn't work : group header are still there (without text) and I have no more data.
    Code:
    // Not working
    disableListGrouping: function() {
        var list = Ext.getCmp('operationList');
        list.setLoading(true);
        list.grouped = false;
        list.refresh();
        list.setLoading(false);
    }
    Is there any way to disable/enable grouping in List after it is created ? Any feature like setGrouped(boolean) ?

    Thanks!

  2. Hello again,

    I found a fallback for my issue : each time I want to disable/enable the group feature in my list, I recreate it with the corresponding configuration.
    So, I have 2 list configurations : one with the 'grouped' attribute as true, the other one without it. And a play with it.

    But methods like disableGroup() and enableGroup() would be very useful. Hope they will be in the future.

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    7
    Vote Rating
    0
    Answers
    1
    bk.dbe is on a distinguished road

      0  

    Default


    Hello again,

    I found a fallback for my issue : each time I want to disable/enable the group feature in my list, I recreate it with the corresponding configuration.
    So, I have 2 list configurations : one with the 'grouped' attribute as true, the other one without it. And a play with it.

    But methods like disableGroup() and enableGroup() would be very useful. Hope they will be in the future.
    French Sencha Touch user.