Disable filtering for a specific column in UI-Grid
Asked Answered
A

2

11

I have a column in my grid which is contains several buttons. I want to only disable the filtering feature in that column.

For example, filtering should be available in office phone but It has to disable in Actions column. I want to remove the textbox in Actions column.

enter image description here

Aleshia answered 10/9, 2015 at 15:42 Comment(0)
A
22

You can set enableFiltering:false on the Actions field

for example:

 { 
      field: '', enableFiltering: false
 }
Arms answered 10/9, 2015 at 15:48 Comment(2)
thanks to replay, I edit my question please see the bold part of my questionAleshia
Has anyone got this to work? I can't find any reference to enableFiltering in the docs or the codebaseCoincidence
P
0

You can set the filterHeaderTemplate: '<div class="ui-grid-filter-container"></div>'

columnDefs: [{
    name: 'Name',
    type: 'string',
    filter: {
        condition: uiGridConstants.filter.CONTAINS,
    },
    filterHeaderTemplate: '<div class="ui-grid-filter-container"></div>'
}]

This will not disable the filter feature, but will remove the input box so that user won' t be able to filter by entering txt

Paganize answered 22/2, 2018 at 9:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.