Click here to Skip to main content
15,886,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm using ui-grid for displaying data from DB in Angular JS.I've used Aggregation in one of the field and want to applying filter (in grid only)over the aggregate value instead of cell value.But the filter applies to cell value only.Below is the code of the column in ColumnDef where i'm trying the same :-
{
                        displayName: 'Earning',
                        name: 'Earning',
                        field: 'Earning',
                        width: 150,
                        type: 'number',
                        enableCellEdit: true,
                        enableCellEditOnFocus: true,
                        visible: true,
                        treeAggregationType: uiGridGroupingConstants.aggregation.SUM,
                        customTreeAggregationFinalizerFn: function (aggregation) {
                            aggregation.rendered = aggregation.value;
                        },

                        filter: {
                            condition: function (searchTerm, cellValue) {
                                return DataService.extractData(searchTerm, cellValue);
                            }
                        }
                    },


What I have tried:

Passing
aggregation.value
instead of cellValue.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900