[CLOSED] Gridpanel with direct method - searching

  1. #1

    [CLOSED] Gridpanel with direct method - searching

    Hello,
    I've got a grid panel binding / paging using a direct method. What I'd like to do now is search the grid panel using combo boxes outside of the grid panel - hence the need call the pageproxy's DirectFn="BindData" method again.

    On select of a combo box, I've got a direct event called "GetGridpanelData" which calls the server side direct event. But what it needs to do then is somehow call the direct method which binds the data again. How do I do this? I presume I need to call a method on the store to fire this? Could you show a simple example? Here's my code

    "Store1" proxy:

    <Proxy>
                <ext:PageProxy DirectFn="App.direct.BindData" />
            </Proxy>
    Server side method for binding data:

    [DirectMethod]
            public object BindData(string action, Dictionary<string, object> extraParams)
            {
                StoreRequestParameters pageParams = new StoreRequestParameters(extraParams);
    
                TicketResponse ticketResponse = _managerFactory.TicketManager.GetOpenTickets(User.UserIdentity.AccountId, CreatePageRequest(pageParams));
                List<Ticket> data = ticketResponse.Tickets;
                int total = ticketResponse.TotalCount;
    
                return new { data, total };
            }
    direct event fired from combo box:

    [DirectMethod]
            public void GetGridpanelData(object sender, DirectEventArgs e)
            {
                //Need to hit BindData method here now...how do I do this with my store called "store1"?
            }
    Last edited by Daniil; May 03, 2013 at 1:07 PM. Reason: [CLOSED]
  2. #2
    Found it:

    [DirectMethod]
            public void GetGridpanelData(object sender, DirectEventArgs e)
            {
                store1.LoadProxy();
            }
  3. #3
    Hi @Kev,

    Please note that there is no need to put a [DirectMethod] attribute for a DirectEvent handler.

Similar Threads

  1. Replies: 1
    Last Post: Apr 10, 2013, 8:27 PM
  2. Direct Method is not firing
    By amida in forum 2.x Help
    Replies: 1
    Last Post: Mar 25, 2013, 7:24 AM
  3. [CLOSED] Output Cache issue with Direct Method / Direct Event
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 18
    Last Post: Mar 01, 2013, 5:03 AM
  4. [CLOSED] how to call direct method
    By tactime10 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 04, 2012, 8:38 AM
  5. Direct method and direct event over SSL?
    By dimitar in forum 1.x Help
    Replies: 0
    Last Post: Oct 08, 2011, 8:09 PM

Tags for this Thread

Posting Permissions