Chapter 8. The EditorGridPanel
This chapter covers
- Implementing an EditorGridPanel
- Learning to exercise full data CRUD cycles
- Deploying the DataWriter
In the last chapter, you learned about the GridPanel and how it can be used to display data. We integrated a PagingToolbar into our complex GridPanel to allow us to flip through large amounts of paginated data.
In this chapter, we’ll build on our previous work to construct a working EditorGridPanel, which will allow you to modify data inline much like you can in popular desktop spreadsheet applications like Microsoft Excel. You’ll also learn how to integrate context menus and toolbar buttons with Ajax requests for CRUD operations.
You’ll start out by creating your first EditorGridPanel, where you’ll get an introduction to what an EditorGridPanel is and how edits are possible. We’ll discuss the ins and outs of setting up UI widgets for interaction to support insert and delete CRUD operations as well as how to get modified Records from the store or even reject changes. Building up an EditorGridPanel without saving the data is useless, so we’ll take advantage of this opportunity to show how to code for CRUD operations.
Afterward, we’ll integrate Ext.data.DataWriter and show how it can save you time by doing a lot of the heavy lifting and reducing the amount of code that you need to write.
This is going to be one of the most intense chapters yet.