ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Grouping Grid Row Content Layout Changed in Latest Version.

Open debayan31 opened this issue 11 years ago • 2 comments

In previous version we got column value through "row.entity.".

If I was trying to get out the headers, my code would be something like:

var headers = []; $scope.gridApi.grid.renderContainers.body.visibleRowsCache.forEach( function( row, index ) { if( row.groupHeader ) { headers.push ( { label: row.entity.field1, value: row.entity.field2 } ); } }); I'm assuming here that field1 is the field I am grouping by, and field2 the field I am aggregating by.

But while debugging with latest version I found that within row.entity column name is not there. So how can I got rendered column value? <Inside entity object structure is something like $$uiGrid-00G: Object, $$uiGrid-00D: Object>

Find screenshot for reference.

chart view

debayan31 avatar May 25 '15 11:05 debayan31

This is described in the updated tutorial (there are now two tutorials - simple and complex, one of them includes an example of this) and the updated api documentation.

PaulL1 avatar May 25 '15 17:05 PaulL1

PauL,

In Tutorial http://ui-grid.info/docs/#/tutorial/209_grouping I found that there is a function named "getAggregates" in not working correctly as because inside Line no --> 51 <app.js> is not exacuting.

debayan31 avatar May 26 '15 05:05 debayan31