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

Client Side Filtering - "OR" versus "AND"

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 03 Oct 2012, 04:15 PM
I am applying some client side filtering on my grid, however, I would like to change the filtering logic to use "OR" instead of "AND".

Example:
I am adding in multiple filters...
{ field: 'Status', operator: '==', value: 'Active' }
{ field:
'Status', operator: '==', value: 'Pending' }

The default logic on the grid will cause it to filter like so - Status = Active AND Status = Pending.  

Instead I want to have my fitlers do the following: Status = Active OR Status = Pending

I cannot find any examples of this.  Is this possible to do?

1 Answer, 1 is accepted

Sort by
0
Nick
Top achievements
Rank 1
answered on 03 Oct 2012, 05:22 PM
Figured it out.  After I set my filter I just updated the logic attribute.

$("#Grid").data("kendoGrid").dataSource.filter().logic = "or";
Tags
Grid
Asked by
Nick
Top achievements
Rank 1
Answers by
Nick
Top achievements
Rank 1
Share this question
or