PDA

View Full Version : Rejecting changes on a grid in ExtJS 4.0



StutiAwasthi
2 Nov 2011, 10:57 PM
Hi all..!

I am in the process of changing a web application from ExtJS 1.1 to ExtJS 4.0.
Can anyone please tell me how to reload the grid in case of ExtJS 4.0.?
The ExtJS 1.1 equivalent is shown below:

var reloadGrid = function(){
grid.getDataSource().rejectChanges();
grid.getDataSource().reload({params:{start: 0, limit: paging.pageSize}});
tabs.activate('view');
tabs.disableTab('edit');
};

Any other comments on the code are also welcome. :)

Thank you in advance!

mitchellsimoens
3 Nov 2011, 6:48 AM
At what point do you want to reject changes?

StutiAwasthi
3 Nov 2011, 10:22 PM
I am sorry... I actually want to reload the grid. By mistake I wrote it as reject. Can u help? I have made the changes in the post, please check.

mitchellsimoens
4 Nov 2011, 4:07 AM
If you reload the store or change any of it's data, the grid will automatically reflect these changes.

StutiAwasthi
5 Nov 2011, 1:04 PM
Thank you!