Frage

I've spent hours searching a solution for this. We have a description column in a Telerik MVC Razor grid. We've enabled filtering, and the filtering, in a basic sense, works fine. However, we would like to be able to filter the text column more accurately. For example, if I do a Contains filter with the condition "Hwy 20", the grid returns every row with "Hwy 20", "Hwy 201", "Hwy 20/41", "Hwy 205", etc...

How can we get it to return ONLY records with "Hwy 20"?

Keine korrekte Lösung

Andere Tipps

It can be accomplished by using filter extensions:

.Filterable(filterable => filterable
    .Extra(false)
    .Operators(operators => operators
        .ForString(str => str.Clear()
            .StartsWith("Starts with")
            .IsEqualTo("Is equal to")
            .EndsWith("Ends with")
        ))
    )

See this documentation url for more information

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top