I know this is a newbie's question, but I am really bumping my head with it.
I have a page with the button that will load data to a grid.
The grid's columns are sortable. The data is ordered from database.
From the UI, clients are able to sort data by themselves.
Now, the requirements is that every time clicking the upper "refresh" button
it shall reload the data with the order from database.
But it seems doesn't work out for me since it keeps the remain sorting order from the UI.
This is my method to solve the problem
Code:
listeners: {
click: function() {
storeEG.load();
Ext.getCmp('tempField').removeAll(true);
Ext.getCmp('tempField').add(new Ext.grid.GridPanel({
id: 'display',
store: storeEG,
cm: colModel
}));
resizing();
Ext.getCmp('tempField').doLayout();
}
}
If you have any problems reading my code, please let me know.
I simply create a 'fielset', then removing everything before reloading.
Please spend kindly assist me with this problem.
Thank you very much