Confused
04-21-2008, 12:24 PM
I posted a while back with code to enhance the EditorGrid and reduce the coding needed to handle the common functions with the grid. You can find the posting at:
http://extjs.com/forum/showthread.php?t=19209
I have since updated (re-written) the code to work with ExtJS 2.x and added some more functionality including the ability to send all the changed data back to the server in a single JSON call. Here's a summary of the features:
binds the return key for handling click and double click
binds the end key to jump to the end of the view
binds the home key to jump to the top of the view
if a menu is set in the config, then the grid binds it for the context menu
if an added/inserted record doesn't change from it's defaults it will be cleared away automatically when the edit stops
default values can be specified in the record class and will be used when inserting/adding a record
The attached code does send the save ajax call, but I can't share the script that I am using at this time. The script basically receives a JSON record, and using the available libraries to parse the information and insert it into the database.
The code is in no way perfect, but it does the job... Feedback more than welcome.
http://extjs.com/forum/showthread.php?t=19209
I have since updated (re-written) the code to work with ExtJS 2.x and added some more functionality including the ability to send all the changed data back to the server in a single JSON call. Here's a summary of the features:
binds the return key for handling click and double click
binds the end key to jump to the end of the view
binds the home key to jump to the top of the view
if a menu is set in the config, then the grid binds it for the context menu
if an added/inserted record doesn't change from it's defaults it will be cleared away automatically when the edit stops
default values can be specified in the record class and will be used when inserting/adding a record
The attached code does send the save ajax call, but I can't share the script that I am using at this time. The script basically receives a JSON record, and using the available libraries to parse the information and insert it into the database.
The code is in no way perfect, but it does the job... Feedback more than welcome.