Sharon Watinsan
Sharon Watinsan

Reputation: 9840

Group Grid Row Wise

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:

enter image description here

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

Answers (1)

sha
sha

Reputation: 17850

You need also to add this to your store definition:

...
groupField: 'f_topic' // or whatever your field name is 
...

Upvotes: 1

Related Questions