DatasheetElement (Component)

A datasheet provides non-technical users with easy access to a web site's data. After selecting the data source, which can be the result of an SQL query, and its fields, the user can sort and filter the data. The DatasheetElement object manages the display of column and row-oriented information returned by custom elements and simple forms. Methods let you manage the association between action columns within a view and the returned data. Methods let you define the views into which CommonSpot places returned information as well as manage view information (for example, deleteView() or setDefaultView()) and see how view information is defined.

Methods marked below with [L] may be logged at the site level (if transaction logging is licensed and enabled by the administrator)

Methods marked below with [C] may be customized at the site level

Methods:

addColumns [L] [C] Adds columns to a datasheet's view.
addCustomQueryView [L] [C] Creates a datasheet view for displaying the results of a custom query.
addView [L] [C] Creates a datasheet view for displaying the results for a custom element or a simple form.
cloneView [L] [C] Copies a datasheet view.
deleteActionColumn [L] [C] Deletes an action column.
deleteColumn [L] [C] Removes a column from a datasheet's view. If you want to delete an action column, you will need to use the 'deleteActionColumn() method.
deleteView [L] [C] Deletes a datasheet's view.
getActionColumnInfo [C] Returns a structure containing information about a datasheet action column.
getActionColumnModules [C] Returns zero or more structures, each of which contains information about a module's path and file name information. These are the modules that reside within the site's 'datasheet-modules' directory.
getColumnsForCustomQuery [C] Returns zero or more structures, each containing information about the information in datasheet columns; for example, the column's type (standard or action), name, and so on.
getCustomQueryInfo [C] Returns a structure whose members contain information about a query. For example, a user name, password, the SQL query, and so on.
getFormColumns [C] Returns zero or more structures, each containing information about the columns in a simple form, custom element, or page result. If the 'formID' argument is set to 0, CommonSpot returns columns for a page result datasheet.
getViewColumns [C] Returns one or more structures, each containing information for how a column is used within a datasheet's view.
getViewInfo [C] Returns a structure containing information a view; for example, the view's name, source, and so on.
getViewInfoByID [C] Returns a structure containing information about a view; for example, the view's name, source, and so on.
getViews [C] Returns zero or more structures, each containing information on that datasheet instance's view.
saveActionColumn [L] [C] Updates an existing datasheet's action column or creates a new one.
saveColumnOrder [L] [C] Sets the order in which CommonSpot displays columns in a datasheet's view.
saveViewOrder [L] [C] Set the order in which CommonSpot displays a datasheet's view.
setDefaultView [L] [C] Makes this view a page's default view.
setViewState [L] [C] Sets the state (either public or private) for a specified view.
updateCustomQueryInfo [L] [C] Updates the information about a custom query datasheet view.
updateViewInfo [L] [C] Updates view details; for example, the view's name, is it the default, and so on.
validateCustomQueryInfo [C] Throws an error if any of the information for the custom datasheet query is not valid.
validateViewInfo [C] Validates a datasheet's view information to determine if the current user can create or edit this view. This method throws an error if the view information is not valid.