May 03, 2013, 11:24 AM
[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:
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]