-
2 Nov 2011 10:57 PM #1
Answered: Rejecting changes on a grid in ExtJS 4.0
Answered: Rejecting changes on a grid in ExtJS 4.0
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!
-
Best Answer Posted by mitchellsimoens
If you reload the store or change any of it's data, the grid will automatically reflect these changes.
-
3 Nov 2011 6:48 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3157
At what point do you want to reject changes?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
3 Nov 2011 10:22 PM #3
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.
-
4 Nov 2011 4:07 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3157
If you reload the store or change any of it's data, the grid will automatically reflect these changes.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Nov 2011 1:04 PM #5
Thank you!


Reply With Quote