i am leveraging this project to use jqgrid to filter and sort collections. The one missing feature is that this example is not doing case insensitive search which i need.
So if a user types in "Test" i want it to match with "TEST", "TeST", etc . .
i have code that looks like this:
case WhereOperation.Equal:
condition = Expression.Equal(memberAccessToString, filter);
lambda = Expression.Lambda(condition, parameter);
break;
case WhereOperation.NotEqual:
condition = Expression.NotEqual(memberAccessToString, filter);
lambda = Expression.Lambda(condition, parameter);
break;
case WhereOperation.Contains:
condition = Expression.Call(memberAccessToString,
typeof(string).GetMethod("Contains"),
Expression.Constant(value));
lambda = Expression.Lambda(condition, parameter);
break;
is there anyway to have these checks below being case insensitive so "Test" would equal "TEST"
Expression.NotEqual
Expression.Equal
Expression.Call(memberAccessToString,
typeof(string).GetMethod("Contains"),
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…