0
votes

$scope.filterOptions = {
            filterText: "",
            useExternalFilter: false
        };

    $scope.gridOptions = { 
        data: 'myData' ,
        filterOptions: $scope.filterOptions,
         showFilter: false,

        },
        columnDefs: [

                {field:'firstName', displayName:'First'}, 
                {field:'lastName', displayName:'Last'},
                 {field:'department', displayName:'Department'},
                 {field:'location', displayName:'Location'},
                 {
                    field:'xmppStatus', 
                    displayName:'Status', 
                    cellTemplate: 'cellTemplate_status.html'
                 },
                ]
    };

This is my code. i want to filter only firstname and last name. and the table data's are from json files.

1

1 Answers

0
votes

Look at http://angular-ui.github.io/ng-grid/ under "ColumnDefs Options", under the attribute "sortable". Set that to false if you don't what that column to sort, or true if you do