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

contains-filter with client api doesn't work

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bo
Top achievements
Rank 1
Bo asked on 16 Mar 2021, 11:23 AM

Hello,

we have a grid with client databinding. Backend is a WCF web service.

The requirement is, the client side column filter setting(user has a filter text in the column Title) shall be restored if the page has been reloaded(for example after adding a new item).

But the Contains-filter doesn't work with part-match. It works only if the filter-text equals the Title(full match). It is the same with StartWith-filter.

What wasI wrong?

The Telerik.Web.UI assembly version is 2015.2.826.45

Please help. Thanks.

function applyFilter() {
    var grid = $find("<%= RadGrid_PublishedDocuments.ClientID %>");
    var tableView = grid.get_masterTableView();
 
    var column = tableView.getColumnByUniqueName("Title");
    column.set_filterFunction("Contains");
    tableView.filter("Title", "dcr", Telerik.Web.UI.GridFilterFunction.Contains, true);
    tableView.rebind();
}

 

 

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 19 Mar 2021, 09:03 AM

Hi Bo,

I am afraid we are not aware of such an issue with the RadGrid.

I have tested the behavior in our live demo - Declarative Binding and it is working as expected, see http://somup.com/creqjNbqPq.

In order to help you with troubleshooting, we would need some more details of the current case. Could you please share the complete markup declaration of the RadGrid along with the related C#(or VB) code? 

Also please clarify how is the binding to WCF service performed? Is it declaratively as shown in the linked demo above or by using a RadClientDataSource?

Looking forward to hearing from you/

Kind regards,
Doncho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Bo
Top achievements
Rank 1
Answers by
Doncho
Telerik team
Share this question
or