Registering a custom filter
Name Surname Marital status Age Employed
Joe Crosswave Married 31 False
Merry Lisel Widowed 41
Henry Crux Single 28 True
Cody Jurut 49 False
Simon Scranton Single 34
Leena Laurent Divorced 19 False
Ode Cosmides Married 53 True
Diandra Mizner Single 20 False
Pete Cassel Married 22 False
Nicky Tremblay Married 31 True
Startup

public void ConfigureServices(IServiceCollection services)
{
    services.AddMvcGrid(filters =>
        filters.Register(typeof(Int32), "contains", typeof(NumberContainsFilter)));
}

Filter

public class NumberContainsFilter : BaseGridFilter
{
    public override Expression Apply(Expression expression)
    {
        if (Values.Length == 0 || Values.Any(String.IsNullOrEmpty))
            return null;

        return base.Apply(expression);
    }

    protected override Expression Apply(Expression expression, String value)
    {
        Expression valueExpression = Expression.Constant(value.ToUpper());
        MethodInfo toStringMethod = typeof(Int32).GetMethod("ToString", new Type[0]);
        MethodInfo containsMethod = typeof(String).GetMethod("Contains", new[] { typeof(String) });

        Expression toString = Expression.Call(expression, toStringMethod);

        return Expression.Call(toString, containsMethod, valueExpression);
    }
}

Javascript

var ExtendedNumberFilter = (function (base) {
    MvcGridExtends(ExtendedNumberFilter, base);

    function ExtendedNumberFilter(column) {
        base.call(this, column);

        this.methods.unshift('contains');
    }

    return ExtendedNumberFilter;
})(MvcGridNumberFilter);

new MvcGrid(document.querySelector('.mvc-grid'), {
    filters: {
        'number': ExtendedNumberFilter
    }
});

MvcGrid.prototype.lang.number.contains = 'Contains';