-
30 Mar 2012 2:10 AM #1
Associated Data in Grid
Associated Data in Grid
Hello Forum,
I am in need of an aha-moment.
Given the following scenario:
I want to show items in a grid that belong to a group.
(item belongsTo group)
(group hasMany items)
I want to show the group label instead of the group_id.
My background is Flex and usually when I wanted to show this kind of scenario I would wait for the items and the groups to be loaded and then find the right group for every item and show it's label.
Do I use the same aproach in ExtJs?
thanks
-
30 Mar 2012 6:45 AM #2
Have you looked at our grouping grid:
http://dev.sencha.com/deploy/ext-4.0...groupgrid.html
You can use the template to change the group label.
Scott.Code:var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{ groupHeaderTpl: 'Cuisine: {name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})' });


Reply With Quote