[CLOSED] Group Count in Grid Panel along with paging (0.8.3)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Group Count in Grid Panel along with paging (0.8.3)


    We have problem with displaying group count in Grid Panel if the data is grouped in a grid panel when paging is enabled.

    We added a group text tpl as follows the grouping view of the grid panel.

    GroupTextTpl='{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Employees" : "Employee"]})'
    We used a paging toolbar with page size 5.

    I am sending the test solution to the support email. Please check.

    Last edited by Daniil; Nov 24, 2010 at 7:49 AM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2

    Please use the following function inside GroupTextTpl
    var getGroupRecordsCount = function (record) {
                var store = record.store,
                    group = record.get(store.groupField),
                    records = store.getAllRange(),
                    count = 0,
                Ext.each(records, function(r){
                    st = store.fields.get(store.groupField).sortType;
                    v1 = st(r.get(store.groupField));
                    v2 = st(group);
                    if(v1 == v2){
                return count;
    GroupTextTpl='{text} ({[getGroupRecordsCount(values.rs[0])]} {[values.rs.length > 1 ? "Companies" : "Company"]})'
  3. #3

    Thank you! It worked. Please mark this as solved.


Similar Threads

  1. Replies: 0
    Last Post: Jan 06, 2011, 9:50 PM
  2. [CLOSED] How to get record count from the grid panel
    By Vasudhaika in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 04, 2011, 10:09 AM
  3. Header Group in Grid Panel
    By Rakeshkumar.a in forum 1.x Help
    Replies: 1
    Last Post: Dec 21, 2010, 9:59 AM
  4. [CLOSED] group count in grid
    By alexp in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 31, 2010, 6:26 AM
  5. Grid panel one group select all
    By anilkumar in forum 1.x Help
    Replies: 0
    Last Post: Jun 13, 2009, 4:18 AM

Posting Permissions