开发者

RIA Services Filter descriptor

I have a Filterdescriptor as shown below. The propertypath is of type 'char?'

<riaData:FilterDescriptor PropertyPath="Valid" Operator="StartsWith">
    <riaControls:ControlParameter PropertyName="Text" RefreshEventName="TextChanged"    ControlName="ValidFilterBox" />
</riaData:FilterDescriptor>

I get following InvalidOperationException when I filter by entering a value Y

InnerExceptio开发者_运维知识库n {System.InvalidOperationException: A FilterDescriptor with its PropertyPath equal to 'Valid' cannot be evaluated. ---> System.ArgumentException: Operator 'StartsWith' incompatible with operand types 'Char?' and 'Char?' ---> System.ArgumentNullException: Value cannot be null. Parameter name: method at System.Linq.Expressions.Expression.ValidateCallArgs(Expression instance, MethodInfo method, ReadOnlyCollection1& arguments) at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable1 arguments) at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, Expression[] arguments) at System.Windows.Controls.LinqHelper.GenerateMethodCall(String methodName, Expression left, Expression right) at System.Windows.Controls.LinqHelper.GenerateStartsWith(Expression left, Expression right) at System.Windows.Controls.LinqHelper.BuildFilterExpression(Expression propertyExpression, FilterOperator filterOperator, Expression valueExpression, Boolean isCaseSensitive, Expression& filterExpression) --- End of inner exception stack trace --- --- End of inner exception stack trace ---} System.Exception {System.InvalidOperationException}


Sorting / Filtering / Grouping is really will be easy with using "RIA Services DataFilter Control for Silverlight". http://riadatafilter.codeplex.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜