[CLOSED] gridfilter / submitted data / json deserialize different values

  1. #1

    [CLOSED] gridfilter / submitted data / json deserialize different values

    Hi

    In a gridpanel with an ajaxproxy (.ashx) I am working with gridfilters. Unfortunately I can't use a direct method so I get the filter values in the context.request object as json strings. Sometimes the look like this
    "[{\"type\":\"boolean\",\"value\":\"true\",\"field\":\"C\"}]"
    and sometimes like this
    "[{\"type\":\"list\",\"value\":[\"a\"],\"field\":\"b\"}]"
    depending if it was a listfilter or a booleanfilter, etc. Is there a possiblility to deserialize easly into the filtercondidtions or a simple dictionary? The first one is easy but the second one has "[]" in it so I get an error... I will never use an array there but the listfilter submits the data like this anyway.

    Thank you for some tips or any help.
    Last edited by Baidaly; Oct 09, 2013 at 7:52 PM. Reason: [CLOSED]
  2. #2
    Hi @tMp,

    Seems the only thing you should do is:
    FilterConditions fc = new FilterConditions(s);
    where "s" is a JSON filter string which you get from a request.

    So, does it not work for you?
  3. #3
    @Daniil.

    Oh, mea culpa. That works perfectly. I thought that was only for the direct method!

    thank you very much.

Similar Threads

  1. [CLOSED] json deserialize problem
    By albayrak in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 21, 2015, 2:28 PM
  2. [CLOSED] Using JSON.Serialize() and JSON.Deserialize()
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 30, 2013, 2:37 PM
  3. [CLOSED] Json Deserialize error when save
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 07, 2010, 2:39 PM
  4. [CLOSED] JSON.Deserialize Lastes SVN
    By egodoy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 21, 2010, 5:59 PM
  5. [CLOSED] [1.0] Ext.encode and JSON.Deserialize
    By state in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 14, 2010, 8:03 AM

Posting Permissions