0
votes

I am stuck in one situation where I have to expand the selected row of group grid made in Extjs 5.1. But Store.getGroups returns an array of undefined objects,

Can any one had a similar issue, as this was working fine with Extjs 4.2.x?

Fiddle code - works in 4.2.x, doesn't work in 5.1

https://fiddle.sencha.com/#fiddle/8mi

Please help.

1

1 Answers

0
votes

The getGroups() method returns a Ext.util.Collection

You could easily get the the first group name the following way:

var firstGroupName = store.getGroups().getAt(0).getGroupKey();

Check out the fiddle.

To get all groups use the getRange() method.

var groups = store.getGroups().getRange();