Mar 09, 2010, 10:24 AM
Updating GridPanel Store in AjaxEvent
Hi all, I'm relatively new to coolite but am really enjoying it at the minute!
What I'm trying to do is us a couple of gridpanels, and a treepanel on a page, using web services as the store objects proxy. This is all working fine, and behaving as I want!
My next plan was to use an ajaxevent on the treeview click event, to fire a server side method (this is working fine too)!!
In the method I wanted to reconfigure the gridpanels stores proxy settings (to point to a different service / change the service parameters), and then reload the gridpanels. This way the page is responsive, even if one of the gridpanels takes some time to return.
The problem is that although I have updated the stores proxy, when I fire the reload method, the gridpanel still uses the original proxy.
Is this something I can do something about, or am I approaching my problem wrong? I've put my server side method code below:
What I'm trying to do is us a couple of gridpanels, and a treepanel on a page, using web services as the store objects proxy. This is all working fine, and behaving as I want!
My next plan was to use an ajaxevent on the treeview click event, to fire a server side method (this is working fine too)!!
In the method I wanted to reconfigure the gridpanels stores proxy settings (to point to a different service / change the service parameters), and then reload the gridpanels. This way the page is responsive, even if one of the gridpanels takes some time to return.
The problem is that although I have updated the stores proxy, when I fire the reload method, the gridpanel still uses the original proxy.
Is this something I can do something about, or am I approaching my problem wrong? I've put my server side method code below:
protected void TestMethod(object sender, AjaxEventArgs e)
{
var x = e.ExtraParams[0];
HttpProxy prx = new HttpProxy();
prx.Url = string.Format("WatchlistService.asmx/GetAllWatchListItemsByEquipmentId?equipmentId={0}", x);
Store1.Proxy.Clear();
Store1.Proxy.Add(prx);
GridPanel1.Reload();
}
Matt