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
145
How to Overwrite the default filter text
posted

Hi,

My iggrid shows "Contains..." in the filter cell as null default text. I want to show a text which is related to my grid column such as "Search Product..."

Anyone can tell me how can I achieve it?

Thanks,
Dhanasekaran 

  • 23953
    Offline posted

    Hello Dhanasekaran,

    There is no easy way to achieve this, because what igGridFiltering has is a nullText per filter condition and not by column. In order to customize the null placeholder for a column you need to override some inner workings of the filter editor instance for the column, but this is error prone an might not work when you update the Ignite UI to a newer version.

    I'm attaching a sample that demonstrates the approach. Look at the "Product Name" column which null text is "Search Products". This is done in the "rendered" event of the grid. The identifier "grid1_Name" will select the "Name" column filter, so you should change it in order to make it work for your case.

    Disclaimer about the sample: Please note that this custom code will work for this specific case and might not work with any other features and/or functionalities. Also you should consider it not part of the product and not supported by the team.

    Best regards,
    Martin Pavlov
    Infragistics, Inc.

    igGridFiltering.zip