FlexGrid column canuserfilter

Posted by: Guy on 22 October 2017, 11:08 pm EST

    • Post Options:
    • Link

    Posted 22 October 2017, 11:08 pm EST

    Hi,

    I’m wondering if i can set a property preventing the user from filtering a specific column?

    i control filtering in code-behind and don’t want the user to see the Filter icon on the column…

    Thank you,

    Guy

  • Posted 24 October 2017, 9:36 pm EST

    Hi Guy,

    You can use grid’s ColumnFilter for the purpose. Please refer the application implementing the same for the Country column:

    https://www.dropbox.com/s/qjuhzpq8c4vkx6p/FlexGrid_ColumnFilterIssue.zip?dl=0

    Thanks,

    Pragati

  • Posted 26 October 2017, 6:19 pm EST

    Hi Pragati,

    Thank you for your answer and sample.

    However - Once i set a filter via code behind these settings are cleared and i can see the filter icons again…

    1. Is there a way to hide the filter icons all together?
    2. I noticed that when the grid is FlowDirection=‘RightToLeft’ the filter icons are also flipped causing the check mark to show incorrectly (a mirror image of a check mark)…

    Thank you,

    Guy

  • Posted 27 October 2017, 6:05 pm EST

    Hi Guy,

    As per my understanding of your requirement, it seems you wish to set the filter for specific columns (via Code-Behind) but prevent the user from applying/modifying the filter for those columns. If it is so, then once you have set the filter for the column(s) then you may specify that column’s Filter.FilterType to None. Please refer attached image for code-snippet and corresponding output.



    Also, I have uploaded a sample application for your reference: https://www.dropbox.com/s/z6fy04ltnkr2r0o/FlexGrid_ColumnFilterIssue.zip?dl=0

    1. To hide the filter icons all together for all the columns in grid, you may use C1FlexGrid’s EnableFiltering(False) method, as follows:
    _flex.EnableFiltering(false);
    
    1. I could observe the same and it is a Bug. Hence the same has been forwarded to the concerned team for fix {Tracking ID: 294155}.

    Regards,

    Ruchir Agarwal

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels