May 13, 2015, 5:40 AM
[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:
I have two "Math" and two "Science" and I don't see the summary to "Math" group and "Science" group.
Thank you
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 resultI 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]