1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    11
    Vote Rating
    0
    mohit.saxena is on a distinguished road

      0  

    Default Unanswered: Sencha touch 2 : Count no. of items in Groper

    Unanswered: Sencha touch 2 : Count no. of items in Groper


    I have used groper in list to show records by grouping but I have to show also number of items in that group with group header. Please provide me solution regarding this ASAP. Screenshot attached.
    Attached Images

  2. #2
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Boston, MA
    Posts
    48
    Vote Rating
    2
    steve_luken is on a distinguished road

      0  

    Default Count of child items in grouper

    Count of child items in grouper


    Hi, I just updated TouchTreeGrid component with example that demonstrates how to do this. Refer to:
    https://market.sencha.com/extensions/touchtreegrid

    Top of page 18 in "TouchTreeGrid - Documentation.pdf" in the download shows sample properties you need in your store. Basically grouper { property: 'grouper'} is the key. Your data store needs to have field (called 'grouper' in this case) that reflects the full text (including count) you want displayed for each group. That's one way to do it anyway.

    Any feedback regarding TouchTreeGrid should go to this thread:
    http://www.sencha.com/forum/showthre...Grid-component

    Regards,
    Steve

  3. #3
    Sencha User
    Join Date
    May 2013
    Posts
    11
    Vote Rating
    0
    mohit.saxena is on a distinguished road

      0  

    Default Grouper code which I wrote

    Grouper code which I wrote


    I wrote this code in store. What code I have to add for count.


    grouper: {
    groupFn: function (record) {
    return ('Assigned To : ' + record.get('AssignedToUser'));
    }


    },

    Thanks

  4. #4
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Boston, MA
    Posts
    48
    Vote Rating
    2
    steve_luken is on a distinguished road

      0  

    Default


    I'm sure there are other ways to do it but way I did it was to add a field to my store that contained exactly what I wanted to display for each grouping. Refer to ./TouchTreeGrid_Advanced_220/data/dow2012grouper.json file from download (https://github.com/swluken/TouchTreeGrid). It has a field called 'grouper' which is what I display in my grouper example. Hence, I would calculate the # of entries in each group on the server side. The Store references this field in the grouper config using "property" config:

    Ext.define('TouchTreeGrid.store.Dow2012grouper', {
    extend: 'Ext.data.Store',


    requires: [
    'TouchTreeGrid.model.Dow2012'
    ],


    config: {
    model: 'TouchTreeGrid.model.Dow2012',
    storeId: 'Dow2012grouper',
    proxy: {
    type: 'ajax',
    url: './data/dow2012grouper.json',
    reader: {
    type: 'json',
    rootProperty: 'datalist'
    }
    },
    grouper: {
    direction: 'DESC',
    property: 'grouper',
    sortProperty: 'YearMonth'
    },
    sorters: {
    direction: 'DESC',
    property: 'CloseDate'
    }
    }
    });

    Refer to TouchTreeGrid.model.Dow2012 for the field definitions.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar