This question is locked. New answers and comments are not allowed.
I am having a hard time figuring out how to extract a filtering expression from the grid to pass it to the service call where we do all the sorting and pagination. I found a way to get an expression by extracting the filterDescriptor string as:
[
GridAction(EnableCustomBinding=true)]
public ActionResult _CustomBinding(GridCommand command)
{
ViewData[
"total"] = 12;
ExpressionBuilder.Expression<Order>(command.FilterDescriptors).ToString();
//returns:
//"item => ((IIF((item != null), item.OrderID, null) ?? \"\").ToLower() == \"B100001\".ToLower())"
}
I am not sure how to parse or what to do with the returned string. Any ideas?
What is the right way to do it?