New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the Filter menu StringOperators DropDownList options.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class StringOperatorsBuilder

Inheritance: objectStringOperatorsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public StringOperatorsBuilder(StringOperators operators)
Parameters:operatorsStringOperators

Methods

Clears the options.

C#
public StringOperatorsBuilder Clear()
Returns:

StringOperatorsBuilder

Supported only in conjunction with custom messages.

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.Clear()
.IsEqualTo("Equal to")
.IsNotEqualTo("Not equal to")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for Contains operator filter menu item.

C#
public StringOperatorsBuilder Contains(string message)
Parameters:messagestring

The text of the "contains" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.Contains("Contains")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for DoesNotContain operator filter menu item.

C#
public StringOperatorsBuilder DoesNotContain(string message)
Parameters:messagestring

The text of the "does not contain" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.DoesNotContain("Does not contain")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for EndsWith operator filter menu item.

C#
public StringOperatorsBuilder EndsWith(string message)
Parameters:messagestring

The text of the "ends with" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.EndsWith("Ends with")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsEmpty operator filter menu item.

C#
public StringOperatorsBuilder IsEmpty(string message)
Parameters:messagestring

The text of the "isempty" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsEmpty("Is empty")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsEqualTo operator filter menu item.

C#
public StringOperatorsBuilder IsEqualTo(string message)
Parameters:messagestring

The text of the "equal" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsEqualTo("Equal to")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsNotEmpty operator filter menu item.

C#
public StringOperatorsBuilder IsNotEmpty(string message)
Parameters:messagestring

The text of the "isnotempty" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsNotEmpty("Is not empty")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsNotEqualTo operator filter menu item.

C#
public StringOperatorsBuilder IsNotEqualTo(string message)
Parameters:messagestring

The text of the "not equal" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsNotEqualTo("Not equal to")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsNotNull operator filter menu item.

C#
public StringOperatorsBuilder IsNotNull(string message)
Parameters:messagestring

The text of the "isnotnull" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsNotNull("Is not null")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsNotNullOrEmpty operator filter menu item.

C#
public StringOperatorsBuilder IsNotNullOrEmpty(string message)
Parameters:messagestring

The text of the "isnotnulloremtpy" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsNotNullOrEmpty("Is not null or empty")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsNull operator filter menu item.

C#
public StringOperatorsBuilder IsNull(string message)
Parameters:messagestring

The text of the "isnull" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsNull("Is null")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for IsNullOrEmpty operator filter menu item.

C#
public StringOperatorsBuilder IsNullOrEmpty(string message)
Parameters:messagestring

The text of the "isnullorempty" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.IsNullOrEmpty("Is null or empty")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)

Sets the text for StartsWith operator filter menu item.

C#
public StringOperatorsBuilder StartsWith(string message)
Parameters:messagestring

The text of the "starts with" filter operator.

Returns:

StringOperatorsBuilder

Example:
C#
@(Html.Kendo().Grid<OrderViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.OrderID).Filterable(false);
columns.Bound(p => p.Freight);
})
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str
.StartsWith("Starts with")
))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Read(read => read.Action("Orders_Read", "Grid"))
)
)