This question is locked. New answers and comments are not allowed.
hi!,
In silverlight, how can i create predicate from grid filters. ( I can FilterDescriptors)
I read http://www.telerik.com/community/forums/silverlight/gridview/lamba-predicate-from-grid-filters.aspx but I can not it
but FilterDescriptorCollectionExpressionBuilder unavailable in silverlight.
In silverlight, how can i create predicate from grid filters. ( I can FilterDescriptors)
I read http://www.telerik.com/community/forums/silverlight/gridview/lamba-predicate-from-grid-filters.aspx but I can not it
public static IQueryable Where(this IQueryable source, IEnumerable<
IFilterDescriptor
> filterDescriptors)
{
if (filterDescriptors.Count() > 0)
{
var parameterExpression = Expression.Parameter(source.ElementType, "item");
var expressionBuilder = new FilterDescriptorCollectionExpressionBuilder(parameterExpression, filterDescriptors);
var predicate = expressionBuilder.CreateFilterExpression();
return source.Where(predicate);
}
return source;
}
but FilterDescriptorCollectionExpressionBuilder unavailable in silverlight.