11 Jan 2013 11:31 PM #1
Expanding the first grouping of a grouped grid only
I have a requirement to expand the first grouping of a grouped grid when the grid is rendered.
Using the config property startCollapsed i can obviously start all groups collapsed but was wondering how i can start with the first view expanded and all other collapsed only.
I saw there is a private method for the grouping feature called expand which expects an ID, presumably of the grouping you want to expand.
How do i access the ID of the group i want to expand? Is this even possible to achieve?
I used the following code to determine that i need to pass an ID to the expand method:
var groups = Ext.data.StoreManager.lookup('Notifications').getGroups(), gridFeat = grid.features; gridFeat.expand(<--ID expected as JS error 'id' is null or not an object-->);
12 Jan 2013 1:35 AM #2