[CLOSED] I want to reply example GroupingSummary

  1. #1

    [CLOSED] I want to reply example GroupingSummary

    Hi team, I want to reply the example from http://docs.sencha.com/extjs/4.2.3/#...roupingSummary

    in Ext.Net 2.2.xx, but I have a error in the last column to each group, because, I don't see the summary, this is my code:

    <head>
        <title></title>
    <script type="text/javascript">
    Ext.onReady(function () {
    Ext.define('TestResult', {
        extend: 'Ext.data.Model',
        fields: ['student', 'subject', {
            name: 'mark',
            type: 'int'
        }]
    });
    
    Ext.create('Ext.grid.Panel', {
        width: 200,
        height: 240,
        renderTo: document.body,
        features: [{
            groupHeaderTpl: 'Subject: {name}',
            ftype: 'groupingsummary'
        }],
        store: {
            model: 'TestResult',
            groupField: 'subject',
            data: [{
                student: 'Student 1',
                subject: 'Math',
                mark: 84
            }, {
                student: 'Student 1',
                subject: 'Science',
                mark: 72
            }, {
                student: 'Student 2',
                subject: 'Math',
                mark: 96
            }, {
                student: 'Student 2',
                subject: 'Science',
                mark: 68
            }]
        },
        columns: [{
            dataIndex: 'student',
            text: 'Name',
            summaryType: 'count',
            summaryRenderer: function (value) {
                return Ext.String.format('{0} student{1}', value, value !== 1 ? 's' : '');
            }
        }, {
            dataIndex: 'mark',
            text: 'Mark',
            summaryType: 'average'
        }]
    });
    });
    </script>
    
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="rmFormaAvances" runat="server" HideInDesign="true" />
        </form>
    </body>
    This is the result

    Click image for larger version. 

Name:	ErrorGrouping.png 
Views:	55 
Size:	3.8 KB 
ID:	23976

    I have two "Math" and two "Science" and I don't see the summary to "Math" group and "Science" group.

    Thank you
    Last edited by Daniil; May 19, 2015 at 10:32 PM. Reason: [CLOSED]
  2. #2
    Hi @osef,

    It works for me. Please clarify what Ext.NET version are you using?

    Please try with the latest 2.5.3 release or with the sources from SVN.

Similar Threads

  1. Reply with quote
    By RCN in forum Open Discussions
    Replies: 2
    Last Post: Jan 30, 2015, 2:39 PM
  2. [CLOSED] Auto show combobox after message box reply
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 16, 2011, 3:08 PM
  3. [CLOSED] [1.0] GroupingSummary
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 31, 2010, 8:00 PM
  4. GroupingSummary - Not show the sum
    By Maia in forum 1.x Help
    Replies: 1
    Last Post: Jan 21, 2010, 6:21 AM
  5. GroupingSummary error
    By mjessup in forum 1.x Help
    Replies: 1
    Last Post: Feb 18, 2009, 2:39 PM

Tags for this Thread

Posting Permissions