for Remote filtering ,whenever i click for filter/sort, Forms.asp
triggers using proxy,and automaticlly reloaded
earlier when i tried below script, to reload the extjs grid with Forms.asp
returning new xml with filtered grid data, it was working fine.
var gridStore = new Ext.data.Store({
gridId :'d_grid',
reader: new Ext.data.XmlReader({ record: etc }, etc etc),
proxy: new Ext.data.HttpProxy({ url: "Forms.asp?",
timeout: 120000 }),
baseParams:{
XML:$$("XML").value,
some more params
},
data: doc,
remoteSort: true});
but when i tried to modify it with some WCF call like:
var gridStore = new Ext.data.Store({
gridId :'d_grid',
reader: new Ext.data.XmlReader({ record: etc }, etc etc),
proxy: new Ext.data.HttpProxy({ url: "Forms.asp?",
timeout: 120000 ,
success: function (response) {
FilterXml = response.responseText;
created new XmlDoc= with somechanges(FilterXml)
Ext.Ajax.request({
method: 'POST',
url:'/mayo/Service.svc/GetnewXML',
params: {'strIPXML': XmlDoc.xml}});
}}),
baseParams:{
XML:$$("XML").value,
some more params
},
data: doc,
remoteSort: true});
here i am catching the response of earlier asp, and to further modify it sending it to a web service,
with new added ajax returning the same formatted xml as returned in above case (checked using success: function{ alert etc}
),
but "The new xml is not feeded to the grid , as it was feeding in above case"
no errors are thrown..
using extjs 3.4
please help
Solved after much reading,
Problem was , i thought, ajax will reload data using the store.load
, used by HttpProxy,after uch reading and hustle i got tht it might not work for ajax, so now i used store.loaddata
and it worked.
var gridStore = new Ext.data.Store({
gridId :'d_grid',
reader: new Ext.data.XmlReader({ record: etc }, etc etc),
proxy: new Ext.data.HttpProxy({ url: "Forms.asp?",
timeout: 120000 ,
success: function (response) {
FilterXml = response.responseText;
created new XmlDoc= with somechanges(FilterXml)
Ext.Ajax.request({
method: 'POST',
url:'/mayo/Service.svc/GetnewXML',
params: {'strIPXML': XmlDoc.xml}
success: function (response) {
FormXML = PC.getXmlStr(response.responseXML);
doc = OrchGenericObj.GetXMLObj(FormXML, 0);
Ext.getCmp('dashboard_gd').store.loadData(doc);
} });
}}),
baseParams:{
XML:$$("XML").value,
some more params
},
data: doc,
remoteSort: true});