This is a migrated thread and some comments may be shown as answers.

Contains filter No Data Found message is incorrect

6 Answers 262 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gerry
Top achievements
Rank 1
Veteran
Gerry asked on 20 Feb 2018, 05:03 PM

See attached image.

I am using a "contains" filter. It works, but it also incorrectly shows this message "NO DATA FOUND." when there is matching data.

6 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 22 Feb 2018, 09:16 AM
Hello, Gerry,

The described result occurs because the filter operator of the AutoComplete used for filtering is "starts with" by default and it is not the same as the actual filter operator of the Grid.

The default operator can be changed per column using the columns.filterable.cell.suggestionOperator property of the Grid:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.filterable.cell#columns.filterable.cell.suggestionOperator

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Gerry
Top achievements
Rank 1
Veteran
answered on 22 Feb 2018, 06:08 PM
thanks
0
Phil
Top achievements
Rank 1
answered on 15 May 2019, 08:26 PM

Maybe I'm missing something but the above doesn't seem to fully answer the issue raised.

I understand that if you want the default operator to be "Contains", then you should also set the suggestionOperator to "Contains".

But that's not the issue, at least in my case.  In my case, I want the default to be "Starts with", which it is. But I'm using the filter row, and if the user drops down the operator selector and changes it to "Contains", then starts typing, the result incorrectly shows "No Data Found" even though there is matching data present corresponding to the "Contains" filter.

How can this scenario be corrected so that what's displayed in the filter row result matches the user's selected operator?

 

0
Konstantin Dikov
Telerik team
answered on 17 May 2019, 08:26 AM
Hi Phil,

The "suggestOperator" is a property that applies only for the AutoComplete widget in the filter row and that operator will not be changed when the user changes the operator for the filtering of the column. Those are two different operators: one for the filtering of the column and one for the filtering of the filter widget. 

Hope this helps.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Phil
Top achievements
Rank 1
answered on 17 May 2019, 12:00 PM

Not really.  I still don't understand how to resolve the bug I'm encountering, which again is: I include a filter row in my grid, the user changes the operator for a particular text column from the default of "Starts with" to "Contains", then starts typing.  The filter UI incorrectly acts as if the operator is "Starts with" and even if there is data in that column which matches the user's typed text using a Contains filter, it incorrectly shows "NO DATA FOUND".

If the user then presses <Enter> to leave the filter, the grid correctly shows the "Contains" resulting data, so the filter itself worked in the end.  But while the user is in the filter row typing, it's not working correctly.  How do I resolve that issue?

0
Konstantin Dikov
Telerik team
answered on 17 May 2019, 12:40 PM
Hi Phil,

The AutoComplete widget in the filter row displays items, so that the user can easily find an existing value and select it if needed. As documented in the following help topic, the suggestionOperator is separate from the filtering mechanism of the Grid and it applies only to the AutoComplete: 
I would suggest keeping the suggestionOperator to "contains", which will return items in the drop down from which the user could choose from (if needed). 


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Gerry
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Gerry
Top achievements
Rank 1
Veteran
Phil
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or