Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2225
Advanced Filtering - Hidden Columns
posted

Hello,

I have a grid that has hidden columns. These columns are ID fields that the user should never see. However, in the advanced filtering drop-down, the hidden fields are displayed.

I do have the columns declared in the grid definition. I have to because I am using JQuery templating and I have links in the grid that reference the ID field. I also have javascript in the iggridselectionrowselectionchanged event handler that references the ID's. 

However, I am setting the column option to Hidden(true).

Any ideas on how to prevent the hidden fields from showing up in the field drop down box in the advanced filter dialog?

Thanks,
Tony

  • 18204
    Verified Answer
    Offline posted

    Hi Tony,

     

    Thanks for posting in our forums!

    I recommend creating a column setting for each hidden column and setting the allowFiltering option to false.  This will prevent the column from showing in the Advanced Filtering dropdown.  Please see my code snippet for the Filtering feature below for an example:

    [code]{
        name: "Filtering",
        mode: "advanced",
        columnSettings: [
            { columnKey: "ID", allowFiltering: false }
        ]
    }[/code]

    You can find more information on the filtering options in our documentation here: https://www.igniteui.com/help/api/2019.1/ui.iggridfiltering#options

    If you have any further questions or concerns with this, please let me know and I will be glad to help.