Grid Component Properties and Methods
Description
Properties and methods that can be used on the client side to automate grid components.
Placeholders
Placeholders are dynamic objects that can be used JavaScript code to reference objects that are defined by the Application Server.
{grid.object}
Gets replaced with the name of the JavaScript Grid Component Object. For example, if the Grid alias is 'GRID1', then is replaced with 'GRID1_GridObj'. Use this placeholder when you want to call a method of the Grid Object. e.g. {grid.Object}.sort(2), to sort the Grid on column 2.
{grid.componentName}
Gets replaced with the alias of the Grid Component. For example, if the Grid alias is 'GRID1', then {grid.componentName} is replaced with 'GRID1'.
{grid.childObject}
For use in the case when you are opening a child Grid in a pop-up Ajax window. Gets replaced with the name of the JavaScript Grid Component Object for the child Grid that is opened in a pop-up Ajax window. Use this placeholder when you want to call a method of the child Grid Object. e.g. {grid.childObject}.sort(2); to sort the Grid on column 2.
{grid.childComponentName}
For use in the case when you are opening a child Grid in a pop-up Ajax window. Gets replaced with the alias of the child Grid Component.
{grid.clientSideDateFormat}
Placeholder for the client-side date format defined in the Grid component. This placeholder can be used in the Initial value property to set the default date for the initial value of a search or detail view field. For example:
=time("{grid.clientSideDateFormat}",date())
{grid.controlId}
The control Id of the control. Note: See comment on {grid.ControlIDEscaped}.
{grid.controlIdEscaped}
The control Id of the control. Special characters in the id are JavaScript escaped. You must use this placeholder (and not {grid.ControlId}) if you want to use this placeholder in a selector (such as jQuery - jQuery('#{grid.controlIDEscaped}'); )
{grid.rowID}
Gets replaced with the row number of the Grid in which the JavaScript is inserted. For new record rows, the 'NEWROW' prefix is used (e.g. for the first new record row - 'NEWROW1'). Used in constructing JavaScript object names where the use of a - sign would result in an invalid object name.
{grid.rowNumber}
Replaced with the row number of the Grid in which the JavaScript is inserted. For new record rows, negative numbers are used. For example, the 2nd new record row is -2.
{grid.style}
Gets replaced with the style name of the Grid. For example, if the style is 'GlassOlive', then gets replaced with 'GlassOlive'. See [] for more information.
Properties
- _totalRecordsInGridnumber
The total number of records in the Grid.
- isDirtyboolean
Indicates if the Grid has been modified (is "dirty".) If true, records in the Grid (either the Grid part or Detail View part) have been edited, but not yet saved.
Methods
- _getGridVariables Method
Sets the value of special 'system' fields that give information about the state of the Grid.
- _resetRow Method
Undoes any edits that have been made to a row in the Grid and returns the row to its unedited state.
- _selectAllRowCheckboxes Method
If a Grid has a checkbox column, sets the state of the checkbox in all rows of the Grid on the current Grid Page.
- activateControlContainer Method
If a control is inside a Tab or Accordion container, this activates the pane in which the control in contained. Only applies to input controls.
- ajaxCallback Method
Does an Ajax callback to a server.
- alphabetSearch Method
Executes an Alphabet Button search.
- animateHide Method
Allows you to hide an element on the page using animation. See {grid.object}.animateToggle() for more information.
- animateShow Method
Allows you to show an element on the page using animation. See {grid.object}.animateToggle() for more information.
- animateToggle Method
Allows you to show/hide an element on the page.
- argumentValue Method
Get the value of an argument that was passed into the Grid.
- autoRefreshStart Method
Automatically refreshes the Grid (if it is not currently dirty) on the specified interval (in milliseconds)
- autoRefreshStop Method
Turns off auto-refresh
- cancelEditDetailViewRecord Method
If the Detail View 'RowEditStyle' is set to 'OnDemand', and the Detail View is in edit mode, returns the Detail View to the non-editable state.
- cancelEditRow Method
If the Grid's 'Row edit style' is set to 'RowOnDemand', and the row is in edit mode, returns the row to the non-editable state.
- clearDetailViewGlobalError Method
Clears any errors set previously by the .setDetailViewGlobalError() method.
- clearErrors Method
Clears errors in the specified rows. 'rows' is a Javascript array of row numbers.
- clearRowErrors Method
Clears all row errors. See .setRowErrors() for more information.
- clearSearchForm Method
Clears the Search part form and removes the filter that was applied by the Search part.
- closeContainerWindow Method
If the Grid is opened inside a pop-up Javascript window, closes the window in which the Grid is contained. Need to pass in a pointer to any element on the Grid.
- closeCurrentTabbedUIPane Method
If the Grid was opened in a Tabbed UI Pane, closes the current pane in the Tabbed UI.
- closeDetailView Method
Close the Detail View.
- closeParentContainer Method
If a Grid is displayed in a pop-up Ajax window, or a Tabbed UI pane, closes the parent window or Tabbed UI pane.
- deleteDetailViewRecord Method
Delete the record shown in the Detail View.
- deleteRow Method
Delete the record in the specified row of the Grid part.
- detailView Method
Display the Detail View for the specified row in the Grid part.
- detailViewFirstRecord Method
Navigate the record shown in the Detail View to the first record in the Grid.
- detailViewLastRecord Method
Navigate the record shown in the Detail View to the last record in the Grid.
- detailViewNewRecord Method
Put the Detail View into 'enter record mode' so that a new record can be added.
- detailViewNextRecord Method
Navigate the record shown in the Detail View to the next record in the Grid.
- detailViewPreviousRecord Method
Navigate the record shown in the Detail View to the previous record in the Grid.
- detailViewRefresh Method
Refresh the data shown in the Detail View by making an Ajax callback to get the current data in the database.
- detailViewToggle Method
Toggle the state of the Detail View. If it is not current open, show it. If it is currently open, then close it.
- dropDownMessage Method
Shows a dropdown message.
- dropDownMessageHide Method
Hides a dropdown message.
- editDetailViewRecord Method
Puts the Detail View into edit mode.
- editField Method
If the Grid's 'RowEditStyle' is set to 'RowOnDemand', puts the specified row into edit mode.
- editFieldDV Method
If the Detail View's 'RowEditStyle' is set to 'RowOnDemand', puts the Detail View into edit mode.
- editRow Method
If the Grid's 'RowEditStyle' is set to 'RowOnDemand', puts the specified row into edit mode.
- fetchExplicitRecord Method
Adds a specified record to the Grid as the last record on the page.
- filterCheckedRows Method
If the 'checkbox' column in the Grid has been turned on, executes a search on the Grid that returns the checked records.
- getMapDataFromSearchPart Method
If the Search Part has a map control, allows you to read the data from search part.
- getParentObject Method
Returns a pointer to the parent object
- getRowsInGrid Method
Returns the number of rows in the current page of the grid. This is not the same as the number of rows in the Grid query.
- getSelectedRow Method
Returns the selected row number, or null if no row is selected.
- getSessionVariable Method
Get the value of a session variable. The session variable must explicitly 'published' - see 'Published session variables' property in the Grid builder.
- getStateInfo Method
Gets the data from the Grid Component's 'state' object in the form of a text string of name value pairs, delimited with '&' characters.
- getValue Method
Get the value of a control in the Grid, Search or Detail View part.
- gridBaseFilterSet Method
Sets the Grid base filter. Contrast with the .gridFilterSet() method. The base filter cannot be removed by the user. See .gridFilterSet() method for more information.
- gridFilterSet Method
Set an explicit filter and/or order for the Grid Component.
- gridLink Method
Linking a Grid is similar to filtering a Grid, except that when the linked Grid is edited, or new rows are entered, the linking field values are automatically set to the linking values.
- gridQBERowToggle Method
Toggles the state of the Grid QBE row.
- gridQBERowVisible Method
Opens or closes the Grid QBE row. If 'isVisible' is true, then the QBE row is show. If 'isVisible' is false, the QBE row is hidden.
- gridUnlink Method
Unlink a Grid that was previously linked using the .gridLink() method.
- harvestColumn Method
Gets the value for a field in every row of the Grid and returns a delimited string. Default value for delimiter is a comma.
- loadCSSFile Method
Loads CSS from a file. If the flagForeLoad argument is true then the CSS file is loaded even if it has been previously loaded. The default value for flagForceLoad is false.
- loadJavascript Method
Loads a string of Javascript code (typically function definitions).
- loadJavascriptFile Method
Loads Javascript from a file.
- loadSavedSearch Method
Loads a previously saved search from the repository and populates the Search Part in the Grid. If flagExecuteSearch is true, the search will be executed.
- loadXbasic Method
Loads Xbasic function definitions.
- openLookup Method
Opens the lookup Grid for a particular field.
- pageNavigate Method
Navigates to the specified page.
- populateDropdownBox Method
Populates the choices in a Dropdownbox control in the Grid or Detail View part.
- quickSearch Method
Performs a Quick Search for the specified value.
- quickSearchClear Method
Clears the current Quick Search filter.
- refresh Method
Refreshes the data shown in the Grid.
- refreshExternalTreeNavigator Method
Applies to a Tree Control Navigator. Causes the data in the tree control navigator to be refreshed.
- refreshLinkedContent Method
Causes the Grid(s) displayed in the Linked Content Sections to refresh. This method is automatically called whenever the row with focus changes.
- refreshRow Method
Refreshes the data in the specified Grid row.
- resetDetailView Method
Undoes all edits to the Detail View record and returns the record to is state before any edits were made.
- resetGridPart Method
Undoes all edits to all records in the Grid part and returns the records to the state before any edits were made. Equivalent to the user clicking the 'Cancel' button in the Grid toolbar.
- rowCollapse Method
Close the row expander for the specified row.
- rowExpand Method
Opens the row expander for the specified row.
- rowExpandToggle Method
Toggles the row expander for the specified row. If the row expander was closed, it is opened, and vice versa.
- runAction Method
Runs a Javascript Action for the Grid Component that was defined using the Action Script builder.
- saveSearchCriteria Method
Saves the values that have been entered into the Search Part as a 'saved search' in the repository using the passed in name.
- setDetailViewGlobalError Method
Sets the error text for the Detail View Global Errors section.
- setErrors Method
Display error messages for fields in the Grid part.
- setFocus Method
Sets focus to the specified row number.
- setRowErrors Method
Sets the 'row error' for the specified row.
- setRowsPerPage Method
Sets the number of records per page to show in the Grid part.
- setSelectedRow Method
Sets focus to the specified row number.
- setStateInfo Method
Allows you to store arbitrary data in the Grid Component's 'state' object.
- setValue Method
Set the value of a control in the Grid, Search or Detail View part.
- showAll Method
Removes all filters added by the user and shows all records in the Grid. The 'base' filter (specified in the Grid definition) is NOT removed.
- showGridColumn Method
Shows or hides a Grid column.
- showRowExpandGrid Method
If the Row Expander contains multiple Grids, the Grids are shown in a Tab or Accordion control. This method shows the specified Grid for the specified row.
- sort Method
The sort Method sort the Grid on the specified column number.
- submitDetailView Method
Submit the Detail View part to commit any edits that were made to the record shown in the Detail View.
- submitGridPart Method
Saves edits made to the records shown in the Grid part. Contrast with the .submitGridPartRow() method which saves an individual row.
- submitGridPartRow Method
Submits any edits that the user made to a particular row in the Grid.
- submitSearchForm Method
Submits the Search form and performs a search using the criteria that the user entered into the Search part form.
- toggleNewRecordRows Method
Toggles the display of new record rows in a Grid Component.
See Also