How Can I Customize The Field Editor Behavior?
By default the Data Grid field editor allows users to enter data and save it back to the Data Grid. If you need data entry to behave differently you can assign your own behavior script to the field editor before it opens. This lesson will show you how.
Create Your Behavior Script
1) Create a button to hold the behavior script you want to use with the Data Grid field editor. I've placed this button on the same card as the data grid.
2) Set the script of your button to the script of the behavior of button "Field Editor" of stack "revDataGridLibrary". This is the behavior script that Data Grid uses by default and is a good place to start when customizing the behavior.
set the script of button "Custom Field Editor Behavior" to the script of the behavior of button "Field Editor" of stack "revDataGridLibrary"
Customize Your Script
Make any customizations you need to make.
Assign Your Custom Behavior to Field Editor
Whenever the Data Grid displays the field editor (e.g. the user double-clicks on a cell in a table) a preOpenFieldEditor message is sent the Data Grid. The first parameter is a reference to the field editor control. This is where you can assign your behavior script to the field.