Ticket T430508
Visible to All Users

ASPxGridView - AutoFilterCondition - how to process search requests with wild-card symbols like "%Cheese%Cream%"

created 9 years ago

[DevExpress Support Team: CLONED FROM Q310741: How to use the "Contains" filter operator in the Auto Filter Row]
Hi Svetlana,

I am using "contains" in my gridview  for one column but I have an issue where it does not work.

When I type in “cheese cream”… nothing gets found… then I type cheese phil   if finds a record as the exact description in the grid is Cheese Philadelphia Cream. So can I do something with filter that will allow me to search on %Cheese%Cream%

I hope I am clear . Please let me know if you need any further information

Thanks
Nirav

Answers approved by DevExpress Support

created 9 years ago

Hello,

Currently, the ASPxGridView filter row does not support wild-card symbols in a filter expression by default. See the ASPxGridView (BC1125) - Wildcards ("%", "_", "*", "?") are no longer supported in auto-filter row article for more information regarding this.
To use the "%" or "_" wildcard, you can enable the grid's filter row menu by setting ShowFilterRowMenu to true and add the "Like" operation to the filter row menu. Set the GridViewDataColumnSettings.ShowFilterRowMenuLikeItem to true for the required column to add this operation. In this case, after selecting the Like menu item, you will be able to use such expressions in the filter row. See the attached video demonstrating this behavior.
Let us know if this approach meets your requirements.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.