Remote Filter with HttpProxy

  1. #1

    Remote Filter with HttpProxy

    Hi,

    Can you please direct me into the right direction how to clear the filter parameters when using HttpProxy on a grid. My grids are generated from code behind. I am able to set filters on it using the GridFilters plugin. However once I put a filter on my grid and then try to regenerate the grid, the filter parameter still gets passed as shown in firebug.

    As a reference, I also posted how I generate my grid from code behind called through DirectEvent.
    http://forums.ext.net/showthread.php...sing-HttpProxy


    I've tried the following but to no avail:
    (1) adding a beforedestroy listener to my grid:
    grid.Listeners.BeforeDestroy.Handler = "function() {this.plugins[0].clearFilters();}";

    (2) adding an empty autoload filter parameter to my store:
    store.AutoLoadParams.Add(new ExtJS.Parameter { Name = "filter", Value = EmptyValue.EmptyString.ToString(), Mode = ParameterMode.Value });



    I found this thread and Vladimir mentioned something on 12/23/2010 about clearing the response. I'm not quite sure how to implement this in my case.

    http://forums.ext.net/showthread.php...sing-Httpproxy

    I would really appreciate your help on this one as I am really stuck.

    Thanks,
  2. #2
    Hi,

    I tried a few more things:

    I added this instead.
    grid.Listeners.BeforeDestroy.Handler = "function() {this.getFilterPlugin().clearFilters();}";

    I also noticed on firebug that after I set the filters on the grid, and try to call the directevent again that will regenerate the grid, it calls my Httpproxy twice. The first time, it passes all of my BaseParams but without my AutoLoadParams i.e, start and limit producing the following error message.

    {"Message":"Invalid web service call, missing value for parameter: \u0027start\u0027.","StackTrace":" at System.Web.Script.Services.WebServiceMethodData.Ca llMethod(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.WebServiceMethodData.Ca llMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMetho d(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebS erviceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperat ionException"}

    The second time it calls the HttpProxy, it passes both my Autoloadparams and BaseParams producing the correct results.

    Thanks.

Similar Threads

  1. Remote filter for Header Filter
    By huzzy143 in forum 1.x Help
    Replies: 2
    Last Post: May 09, 2012, 3:43 PM
  2. Remote GridFilters via HttpProxy
    By Thinjon100 in forum 1.x Help
    Replies: 1
    Last Post: Sep 19, 2011, 1:39 PM
  3. Replies: 0
    Last Post: Mar 01, 2011, 12:09 PM
  4. [CLOSED] Remote Filter using Httpproxy
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Dec 29, 2010, 8:08 AM
  5. Replies: 3
    Last Post: Jun 25, 2010, 9:06 AM

Tags for this Thread

Posting Permissions