Reputation: 9840
I have a grid, that displays the values in column form. but I want it to be displayed as rows; as shown in the image below:
My code is as follows. Presently I can see the data in Column wise, and not Row wise (Grouped one under the other) as shown in the image. How can I group the components Row wise?
initComponent: function() {
var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
groupHeaderTpl: 'Group: {name} ({rows.length})', /
startCollapsed: true
});
this.columns = [
{ text: "Name", dataIndex: 'f_name' },
......
Upvotes: 1
Views: 739
Reputation: 17850
You need also to add this to your store definition:
...
groupField: 'f_topic' // or whatever your field name is
...
Upvotes: 1