talha06
30 Nov 2009, 2:38 PM
Hello to everyone,
I'm not an advanced developer at ExtJS. I'm working a library automation system. In my search page when the page opened first time, I show ALL books on grid.. After the user enters the keywords for search I want to refresh the grid.. When user enters keywords and click the button, I connect with DB and return the records.. I change the store's proxy url.. There's no problem at these steps.. Because I checked the returning values(actually they're books in my project).. I can't refresh the grid.. I see ALL records(as I see first).. Nothing changes..
Here's what I tried.. Actually I searched a lot and saw that many people have same problem.. I did what they recommend, but their recommendations didn't work for me..
Thanx in advance,
T
Here's the code:
handler: function() {
var m = Ext.getCmp('searchText').getValue();
var n = Ext.getCmp('byText').getValue();
Ext.Ajax.request({
url: 'searchList?searchText='+ m +'&byText=' + n,
method: 'POST',
success: function(result, request) {
// new store proxy url - this one returns the searched books; first one lists ALL books
Ext.getCmp('grid').getStore().proxy.conn.url = 'searchList?searchText='+ m +'&byText=' + n;
Ext.getCmp('grid').getStore().reload();
}
})
}
// I tried these too (which I saw from the forum(s))
//Ext.getCmp('grid').getStore().load({url:'searchList?searchText='+ m +'&byText=' + n});
//Ext.getCmp('grid').getStore().reload({url:'searchList?searchText='+ m +'&byText=' + n});
//Ext.getCmp('grid').getView().refresh(true);
I'm not an advanced developer at ExtJS. I'm working a library automation system. In my search page when the page opened first time, I show ALL books on grid.. After the user enters the keywords for search I want to refresh the grid.. When user enters keywords and click the button, I connect with DB and return the records.. I change the store's proxy url.. There's no problem at these steps.. Because I checked the returning values(actually they're books in my project).. I can't refresh the grid.. I see ALL records(as I see first).. Nothing changes..
Here's what I tried.. Actually I searched a lot and saw that many people have same problem.. I did what they recommend, but their recommendations didn't work for me..
Thanx in advance,
T
Here's the code:
handler: function() {
var m = Ext.getCmp('searchText').getValue();
var n = Ext.getCmp('byText').getValue();
Ext.Ajax.request({
url: 'searchList?searchText='+ m +'&byText=' + n,
method: 'POST',
success: function(result, request) {
// new store proxy url - this one returns the searched books; first one lists ALL books
Ext.getCmp('grid').getStore().proxy.conn.url = 'searchList?searchText='+ m +'&byText=' + n;
Ext.getCmp('grid').getStore().reload();
}
})
}
// I tried these too (which I saw from the forum(s))
//Ext.getCmp('grid').getStore().load({url:'searchList?searchText='+ m +'&byText=' + n});
//Ext.getCmp('grid').getStore().reload({url:'searchList?searchText='+ m +'&byText=' + n});
//Ext.getCmp('grid').getView().refresh(true);