snow_cap
31 Oct 2011, 2:53 PM
I was able to load the store on the load of the page,but when i try to load the data into the store on button click using Ext.Ajax.request the data in the store are never binded and items length is equal to 0.
am using the following:
var ds= new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({ url: 'handler1.ashx'
}),
id: 'strGrid',
fields: ['DOC_ID', 'DOC_STATUS', 'docDate', 'DOC_MAILNUM', 'DOC_SUBJECT', 'DOC_BARCODE']
});
Ext.Ajax.request({
method: 'GET',
url: 'handler1.ashx',
success: function (response, request) {
ds.loadData(Ext.encode(response.responseText));
}
});
Any ideas?Is there any example where the store is loaded on button click?
Thanking you in advance
P.S.:I debugged the function it's successful and returning the correct data in the response.responsetext
am using the following:
var ds= new Ext.data.JsonStore({
proxy: new Ext.data.HttpProxy({ url: 'handler1.ashx'
}),
id: 'strGrid',
fields: ['DOC_ID', 'DOC_STATUS', 'docDate', 'DOC_MAILNUM', 'DOC_SUBJECT', 'DOC_BARCODE']
});
Ext.Ajax.request({
method: 'GET',
url: 'handler1.ashx',
success: function (response, request) {
ds.loadData(Ext.encode(response.responseText));
}
});
Any ideas?Is there any example where the store is loaded on button click?
Thanking you in advance
P.S.:I debugged the function it's successful and returning the correct data in the response.responsetext