Hy , I have an XtraGrid with AutoFilterRow
the default Filter is :
Starts with([columnName], 'mytext')
but i want to change this to :
[columnName] like '%mytext%'
without creating a Custom Filter
i just want to open the grid , write inside FilterRow 'mytext' and Filter LIKE should by apply to my column
a solution is to catch when the Filter is changed , to create the string and
gridView1.Columns["myCol"].FilterInfo = mystring;
but i do not know how to catch the inserted text
thanks in advance
You need to change the OptionsColumnFilter.AutoFilterCondition option to achieve the desired result.
If you already have this:
Starts with([columnName], 'mytext')
You should be able to go into the XtraGrid Designer, select Layout and at the bottom of the Grid Preview window you can click the "Edit Filter" link which will bring up the Filter Editor.
Change the "Begins With" to "Contains" which is the same as LIKE.
If that doesn't solve what you're trying to do, the other half of your question was where to catch the filter events. The GridView has a few events and the two that you would be interested in are FilterEditorCreated
and ShowFilterPopupListBox
.