Mar 21, 2012, 5:33 PM
[CLOSED] ListFilter System.InvalidCastException
I had a list filter that worked in v1.2 just fine, but I am receiving an error in v2.0. I will continue to research, but just wanted to check if there are any known errors.
FilterConditions.cs - Line 65 An exception is raised here:
<Features>
<ext:GridFilters runat="server">
<Filters>
<ext:ListFilter DataIndex="PerCatNm" Options="Dog, Cat, Fish" />
</Filters>
</ext:GridFilters>
</Features>
The filter displays just fine in the Grid column, but once I select one of the items I receive the error:{serviceResponse:{success:false,message:"System.InvalidCastException: Cannot cast Newtonsoft.Json.Linq.JArray to Newtonsoft.Json.Linq.JToken.
at Newtonsoft.Json.Linq.Extensions.Convert[T,U](T Token) in d:\\development\\Releases\\Json\\Working\\Src\\Newtonsoft.Json\\Linq\Extensions.cs:line 261
When I traced through the code the issue seems to be at:FilterConditions.cs - Line 65 An exception is raised here:
condition.Value= jObject.Value<string>("value");
The jObject is current { "type":"list", "value": [ "Dog", "Cat" ], "field":"PersCatNm"}
The Newtonsoft.Json.dll is Assembly Version 4.0.8.0, File Version 4.0.8.14612
Last edited by Daniil; Mar 22, 2012 at 6:47 AM.
Reason: Please use [CODE] tags, [CLOSED]