[CLOSED] ListFilter System.InvalidCastException

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [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.

     <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]

Similar Threads

  1. [CLOSED] ListFilter scroll bar?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 05, 2012, 5:53 PM
  2. [CLOSED] ListFilter values
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 23, 2012, 3:41 PM
  3. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  4. [CLOSED] ListFilter with a StoreID
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2010, 1:51 PM
  5. Replies: 2
    Last Post: Aug 31, 2009, 6:03 PM

Posting Permissions