1

I want to use the IsContainedIn FilterOperator for Telerik grid.

The following is the FilterOperator enum

public enum FilterOperator
{
    IsLessThan = 0,
    IsLessThanOrEqualTo = 1,
    IsEqualTo = 2,
    IsNotEqualTo = 3,
    IsGreaterThanOrEqualTo = 4,
    IsGreaterThan = 5,
    StartsWith = 6,
    EndsWith = 7,
    Contains = 8,
    IsContainedIn = 9,
    DoesNotContain = 10,
}

Operator Description

  • eq Is equal to
  • ne Is not equal to
  • gt Is greater than
  • ge Is greater than or equal to
  • lt Is less than
  • le Is less than or equal to

But I need Operator for IsContainedIn FilterOperator.

Jorge Bucaran
  • 5,588
  • 2
  • 30
  • 48
  • Per Telerik Documentaion [link](http://docs.telerik.com/devtools/silverlight/api/html/t_telerik_windows_data_filteroperator.htm) Telerik.Windows.Data.FilterOperator.IsContainedIn is a boolean variable, with values true or false. Based on the value returned(true, false in string or just a plain boolean), you might need to typecast it from string to javascript Boolean type to use it [link](http://stackoverflow.com/questions/263965/how-can-i-convert-a-string-to-boolean-in-javascript) – DL Narasimhan Dec 29 '14 at 13:07
  • I am constructing filter object as below $filter.push({ field: 'columnName', operator: "eq", value: 'abc' }); Same way I need to use IsContainedIn FilterOperator. – Hussain Reddy Yatam Dec 29 '14 at 13:26

1 Answers1

0

From the documentation they don't have a specific one for IsContainedIn where you are trying to use it. Looks like behind the scenes for the server side version they just use contains and then change the left and right hand operands. That may not work for your client-side filter here.

See the documentation where they document the only ones they do actually have available. http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-filter.operator

filter.operator String

The filter operator (comparison). The supported operators are: "eq" (equal to), "neq" (not equal to), "lt" (less than), "lte" (less than or equal to), "gt" (greater than), "gte" (greater than or equal to), "startswith", "endswith", "contains". The last three are supported only for string fields.

devjin
  • 51
  • 2