3

I'm using Angular Ui Grid.How can I show multiple fields for the single column ? Thanks.

I need to show both streetNumber and StreetName on the same column.How can I do that ?

vm.propertyListGridOptions = {
                appScopeProvider: vm,
                flatEntityAccess: false,
                fastWatch: true,
                showHeader: false,
                columnDefs: [
                    {
                        name: app.localize('IplNumber'),
                        field: 'id',
                        width: 100,
                    },
                    {
                        name: app.localize('BrAddress'),
                        field: 'address.streetNumber',
                        width: 140,
                    }

                ],
                data: []
            };
0

1 Answer 1

4

You can use custom template like this

$scope.gridOptions['columnDefs'] = [

    {field: 'name', displayName: 'Name'},
    {field: 'options',displayName: 'Options', cellTemplate: '<span>{{row.entity.streetNumber}} {{row.entity.StreetName}}</span>'}
];

You can also refer this page for documentation for custom templates http://ui-grid.info/docs/#/tutorial/317_custom_templates

Sign up to request clarification or add additional context in comments.

1 Comment

Its sorting and filtering based on the options mentioned by field attribute. But how do I filter exactly how the data appear ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.