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

DataSourceFilterStringDescriptorBuilder

Methods

StartsWith(System.String)

Includes only values which are starting with the given string.

Parameters

value - System.String

The string with which the result should start

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.ShipName).StartsWith("Ship"))
            )

EndsWith(System.String)

Includes only values which end with the given string.

Parameters

value - System.String

The string with which the result should end

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.ShipName).EndsWith("Name"))
            )

Contains(System.String)

Includes only values which contain the given string.

Parameters

value - System.String

The string which the result should contain

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.ShipName).Contains("Foo"))
            )

DoesNotContain(System.String)

Includes only values which does not contain the given string.

Parameters

value - System.String

The string which the result should not contain

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.ShipName).DoesNotContain("Foo"))
            )

IsEmpty()

Includes only values which are equal to empty string.

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.ShipName).IsEmpty())
            )

IsNotEmpty()

Includes only values which are not equal to empty string.

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.ShipName).IsNotEmpty())
            )

IsEqualTo(System.String)

Parameters

value - System.String

IsNotEqualTo(System.String)

Parameters

value - System.String

IsNull()

Includes only values which are null.

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.Freight).IsNull())
            )

IsNotNull()

Includes only values which are not null.

Example


            .DataSource(dataSource => dataSource
                    .Ajax()
                    .Filter(f => f.Add(o => o.Freight).IsNotNull())
            )

In this article
Not finding the help you need?