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

StringOperatorsBuilder

Methods

Clear()

Clears the options.

Example


            @(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"))
                )
            )

IsEqualTo(System.String)

Sets the text for IsEqualTo operator filter menu item.

Parameters

message - System.String

The text of the "equal" filter operator.

Example


            @(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"))
                )
            )

IsNotEqualTo(System.String)

Sets the text for IsNotEqualTo operator filter menu item.

Parameters

message - System.String

The text of the "not equal" filter operator.

Example


            @(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"))
                )
            )

StartsWith(System.String)

Sets the text for StartsWith operator filter menu item.

Parameters

message - System.String

The text of the "starts with" filter operator.

Example


            @(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"))
                )
            )

EndsWith(System.String)

Sets the text for EndsWith operator filter menu item.

Parameters

message - System.String

The text of the "ends with" filter operator.

Example


            @(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"))
                )
            )

Contains(System.String)

Sets the text for Contains operator filter menu item.

Parameters

message - System.String

The text of the "contains" filter operator.

Example


            @(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"))
                )
            )

DoesNotContain(System.String)

Sets the text for DoesNotContain operator filter menu item.

Parameters

message - System.String

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

Example


            @(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"))
                )
            )

IsNull(System.String)

Sets the text for IsNull operator filter menu item.

Parameters

message - System.String

The text of the "isnull" filter operator.

Example


            @(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"))
                )
            )

IsNotNull(System.String)

Sets the text for IsNotNull operator filter menu item.

Parameters

message - System.String

The text of the "isnotnull" filter operator.

Example


            @(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"))
                )
            )

IsEmpty(System.String)

Sets the text for IsEmpty operator filter menu item.

Parameters

message - System.String

The text of the "isempty" filter operator.

Example


            @(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"))
                )
            )

IsNotEmpty(System.String)

Sets the text for IsNotEmpty operator filter menu item.

Parameters

message - System.String

The text of the "isnotempty" filter operator.

Example


            @(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"))
                )
            )

IsNullOrEmpty(System.String)

Sets the text for IsNullOrEmpty operator filter menu item.

Parameters

message - System.String

The text of the "isnullorempty" filter operator.

Example


            @(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"))
                )
            )

IsNotNullOrEmpty(System.String)

Sets the text for IsNotNullOrEmpty operator filter menu item.

Parameters

message - System.String

The text of the "isnotnulloremtpy" filter operator.

Example


            @(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"))
                )
            )

In this article
Not finding the help you need?