Creating Custom Add and Delete Buttons for a Grid Pane
TIBCO Business Studio Forms automatically creates Add and Delete buttons for the records in a grid pane if you enable those options on the grid pane’s custom properties sheet. However you can provide custom logic to be executed when a record is added or deleted. To do this, you need to customize the Add and Delete buttons.
Sample Project
To view the sample for this task, import the advanced sample projects as described in Importing the Forms Advanced Samples. The sample form and business object model for the task described in this section are contained in the forms.samples.scripting sample project.
The form (CustomGridActions.form) is at:
forms.samples.scripting/Forms/GridPane/CustomGridActions/
The directions here assume that you already have a form with a grid pane that is bound to an array of objects of type forms.samples.scripting.GridRecord. In the sample, the GridRecord class is in the business object model FormsSamplesScripting.bom at:
forms.samples.scripting/Business Objects/
You can double-click the form and business object model filenames (as well as those of other project resources) in the Project Explorer to open them in the editor. There, you can examine their contents and use them as models for your own projects.