Home Angular UI Grid column filter is not working
Reply: 1

Angular UI Grid column filter is not working

CodeWithCoffee Published in 2018-02-14 05:22:30Z

I am using Angular js UI grid for table.

Although, everything showing perfect, textbox filter for specific column is not visible to me even after applied !!

My Code :

$scope.gridOptions = {

        enableRowSelection: true,
        enableRowHeaderSelection: false,
        enableColumnMenus: false,
        showGridFooter: false,
        paginationPageSizes: [10, 20, 30],
        paginationPageSize: 10,
        paginationOptions: $scope.pagingOptions,
        useExternalPagination: false,
        multiSelect: false,
        enableSorting: true,
        enableFiltering: true,
        modifierKeysToMultiSelect: false,
        noUnselect: false,
        enableVerticalScrollbar: true,
        enableHorizontalScrollbar: true,

    columnDefs: [
                field: 'name',
                displayName: 'UserName',
                width: 150,
                cellTooltip: true,
                CellTemplate: '<div class="GridRow">{{row.name}}</div>',
                headerCellTemplate: '<div style="margin: 22px 0px 0px 0px;" ><span class="ui-grid-cell-contents GridHead">Last Run By</span></div>',
                enableCellEdit: true,
                enableFiltering: true


Added enablefiltering but its still not showing textbox filter and neither it give any warning or error.

Anyone have any input on if I am missing something over here ?

Thank you very much

NiK648 Reply to 2018-02-14 05:55:17Z

The textbox for filtering is not visible because you are providing a headerCellTemplate for that column. See here: Angular UI Grid - Custom Header Template and Filtering. Another solution would be to copy the predefined template of headerCell from ui-grid into your code and modify it as per your requirements.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.461497 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO