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
185
igGrid Filter : how to hide filter menu condition options
posted

I want to hide / remove some below condition options from filter menu,

Next Month and Next year.

Please provide me sample code for this settings.

Parents
  • 17590
    Offline posted

    Hello Sanjay,

    Thank you for contacting Infragistics Developer Support!

    Currently we do not provide out of the box way to selectively remove filter drop-down conditions. However, what I can suggest as workaround is removing the required condition item from the drop down menu. For example, if you have column with an ID of Sell Start Date you could get reference to the filtering drop down for this column and get the item by the applied css class and remove it. Such as:

    //this will remove the lastYear and thisYear filtering conditions


    $("#grid_dd_SellStartDate").find(".ui-iggrid-filtericonlastyear").closest("li").remove();


    $("#grid_dd_SellStartDate").find(".ui-iggrid-filtericonthisyear").closest("li").remove();

    Please note that the css class selector ends with the filter condition name which basically means that you could replace "thisyear" and "lastyear" with the conditions that you would like to remove.

    Some further reference about igGridFiltering theming could be found at the following link:

    http://help.staging.infragistics.local/jQuery/2015.1/ui.iggridfiltering#theming

    I am also attaching a small sample illustrating my suggestion for your reference.

    Please let me know if you need any further assistance with this matter.

    igGridRemoveFilteringConditions.zip
Reply Children