Actions

Action

Description

Add row to

Add a new record to the database.  Processing does not wait until a final “Submit” or “OK” button is clicked.

Apply search and filter to

Applies the current filtering criteria, including a search, to the control.  This operation is normally used for the “Go” button in a search panel or a dropdown filter.  The search term is entered into a separate text box field.

Custom

An application-defined custom command is executed when the button is clicked.  When clicked, the button will emit an event by this name, which can be intercepted in a code extension to your application and processed.  See Calling a custom function when a button is clicked for details.

Delete current record

In Show Record panels, the selected record is deleted from the database immediately.  Processing does not wait until a final “Submit” or “OK” button is clicked.

In Edit Record panels, the selected record is removed from the control so that it is no longer displayed.  The record is deleted from the database and the transaction committed only after a final “Save”, “Submit” or “OK” button is clicked.

Note:  The ‘Delete current record’ command will only delete the designated record.  It will not delete related records that refer to the deleted record.  See Deleting related records for details.

Delete selected row from

In Table Report panels, the selected record(s) are deleted from the database immediately.  Processing does not wait until a final “Submit” or “OK” button is clicked.

In Edit Table panels, the selected record(s) are removed from the control so that they are no longer displayed.  The record(s) are physically deleted from the database and the transaction committed only after a final “Save”, “Submit” or “OK” button is clicked.

Note:  The ‘Delete selected row from’ command will only delete the designated record(s).  It will not delete related records that refer to the deleted record(s).  See Deleting related records for details.

Export data to PDF from

Create a PDF report using data from the associated table.  A file selection dialog is displayed when the button is clicked, prompting the application user for a file name.

Export data to Excel from

Create a Microsoft Excel file containing data from the associated table.  A file selection dialog is displayed when the button is clicked, prompting the application user for a file name.

Export data to CSV from

Create an ASCII CSV file containing data from the associated table.  A file selection dialog is displayed when the button is clicked, prompting the application user for a file name.

Export data to Word from

Create a Microsoft Word report using data from the associated table.  A file selection dialog is displayed when the button is clicked, prompting the application user for a file name.

Import data from

Imports data into the selected table from ASCII CSV, Microsoft Excel and Microsoft Access files.  A wizard is displayed when the button is clicked, prompting the application user for a file name and other details.

You must specify a ‘Go to specific URL’ action (via the Button Action Wizard) to launch the Import Wizard and designate the database table to receive the imported data.  The URL has the format:

../Shared/SelectFileToImport.aspx?TableName=Categories

SelectFileToImport.aspx is the Import Wizard.  ‘Categories’ is an example of the database table receiving the imported data.

Pagination

Perform the selected table pagination operation.

Refresh page

Restores the current page (or form) to its last presented state.  For Add Record pages, the input fields are cleared of any data entered into them.  For Edit Record pages, the data fields are restored to their original values from the database.

Refresh page causes record controls and table controls to refresh their data from the database, even if the fresh data was from a concurrent modification by another user.  I.e., the most current data is always retrieved from the database.  It does not restore from the web browser’s local cache.

Note: Refreshing a page does not reset the filter settings or clear the search text box.  To clear the filters and search text box, simply redirect to the same page using the “Go to a specific URL” Button Action option.

Save data on page

Any input data and edited values on the page are updated (saved) into the database.  Any deleted records are removed from the database.

Save data on table or record

Any input data and edited values in the selected table or record are updated (saved) into the database.  Any deleted records are removed from the database.

Sign out

Sign out of the application.  The application user is logged out.

The Sign Out event is always consumed by the Page unless some form of code customization is employed relating to this event.

Update related panel(s)

Button triggers post back on the related panel (such as Enhanced table with detail below)

None

Button does not trigger any action

Several of the Action options require additional options to be specified.

Option

Description

Enable client-side data validation

The data entered into the page is validated by the application.  All data in each data entry control on the page is validated.

Deleting related records

Sometimes when using the Delete Current Record action, you may see this error in your application:

"Cannot delete Main. A record you were attempting to modify is referenced by other records."

This happens because the Delete Current Record action does not recursively delete all the records in other tables that reference the deleted record.  For example, if an Order Detail record points to the main Order record, the Order record cannot be deleted unless the Order Details records that reference the particular Order record are deleted.

You can accomplish this in several ways.

Public Overrides Function DeleteRecord(ByVal recordIndex As Int32) As IRecord

To delete the OrderDetail records, write a simple “for” loop that goes through each record and calls the Delete method on each record.  Retrieve the record group using the GetList method.