How can I avoid the copy/paste technique shown below in which certain columns of my grid need to have the Is Null, Is Not Null and other built-in filters removed but allow other columns in that same grid to use Is Null, Is Not Null, etc. ?
I do NOT want to do this GLOBALLY for the entire Grid, just certain columns (that are required when they are input into the system, so null and not null are not wanted or needed by the customer).
What I have works, but it seems terribly inefficient to have to physically repeat all that .Filterable() information for each column that needs it.
.Columns(c =>
{
c.Bound(q => q.FirstName)
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
.Contains("Contains")
.DoesNotContain("Does not contain")
.StartsWith("Starts with")
.EndsWith("Ends with")
) // ForString
) // Operators
); // Filterable
c.Bound(q => q.LastName)
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
.Contains("Contains")
.DoesNotContain("Does not contain")
.StartsWith("Starts with")
.EndsWith("Ends with")
) // ForString
) // Operators
); // Filterable
c.Bound(q => q.Email)
.Filterable(filterable => filterable
.Extra(false)
.Operators(operators => operators
.ForString(str => str.Clear()
.IsEqualTo("Is equal to")
.IsNotEqualTo("Is not equal to")
.Contains("Contains")
.DoesNotContain("Does not contain")
.StartsWith("Starts with")
.EndsWith("Ends with")
) // ForString
) // Operators
); // Filterable