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

Kendo Grid Datasource filter 'OR'

2 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 27 Jul 2012, 06:38 PM
Hi,
how can i create filter on multiple columns with 'OR ' as the logical operator?
assume i have 5 columns (string data type)
i want to create a filter like this
filter=  col1 contains ('test') OR col2 contains ('test') OR col3 contains ('test') OR col4 contains ('test')
OR col5 contains ('test').

thanks,
Arun

2 Answers, 1 is accepted

Sort by
0
Arun
Top achievements
Rank 1
answered on 02 Aug 2012, 07:17 PM
bump...

anyone?
0
danparker276
Top achievements
Rank 2
answered on 18 Jun 2014, 05:52 PM
 A couple years late and you probably found the answer, but your post popped up in my search
   
 myGrid.data("kendoGrid").dataSource.filter(
           {
               logic: "or",
               filters: [
                       { field: "addrId", operator: "startswith", value: '1' },
                       { field: "addr1", operator: "contains", value: '1' }
               ]
           }
           );
Tags
Grid
Asked by
Arun
Top achievements
Rank 1
Answers by
Arun
Top achievements
Rank 1
danparker276
Top achievements
Rank 2
Share this question
or