JavaScript

Grid Component Properties and Methods

IN THIS PAGE

Description

Properties and methods that can be used on the client side to automate grid components.

Properties

{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.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.ComponentName}

Gets replaced with the alias of the Grid Component. For example, if the Grid alias is 'GRID1', then is replaced with 'GRID1'.

{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.ControlId}

The control Id of the control. Note: See comment on {Grid.ControlIDEscaped}.

{grid.Object}.isDirty

Returns true if the Grid (either Grid part or Detail View part) is dirty (i.e. record has been edited, but not yet saved).

{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.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}

Gets 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'.

Methods

{grid.object}._getGridVariables Method

Sets the value of special 'system' fields that give information about the state of the Grid.

{grid.object}._resetRow Method

Undoes any edits that have been made to a row in the Grid and returns the row to its unedited state.

{grid.object}._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.

{grid.object}.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.

{grid.object}.ajaxCallback Method

Does an Ajax callback to a server.

{grid.object}.alphabetSearch Method

Executes an Alphabet Button search.

{grid.object}.animateHide Method

Allows you to hide an element on the page using animation. See {grid.object}.animateToggle() for more information.

{grid.object}.animateShow Method

Allows you to show an element on the page using animation. See {grid.object}.animateToggle() for more information.

{grid.object}.animateToggle Method

Allows you to show/hide an element on the page.

{grid.object}.argumentValue Method

Get the value of an argument that was passed into the Grid.

{grid.object}.autoRefreshStart Method

Automatically refreshes the Grid (if it is not currently dirty) on the specified interval (in milliseconds)

{grid.object}.autoRefreshStop Method

Turns off auto-refresh

{grid.object}.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.

{grid.object}.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.

{grid.object}.clearDetailViewGlobalError Method

Clears any errors set previously by the .setDetailViewGlobalError() method.

{grid.object}.clearErrors Method

Clears errors in the specified rows. 'rows' is a Javascript array of row numbers.

{grid.object}.clearRowErrors Method

Clears all row errors. See .setRowErrors() for more information.

{grid.object}.clearSearchForm Method

Clears the Search part form and removes the filter that was applied by the Search part.

{grid.object}.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.

{grid.object}.closeCurrentTabbedUIPane Method

If the Grid was opened in a Tabbed UI Pane, closes the current pane in the Tabbed UI.

{grid.object}.closeDetailView Method

Close the Detail View.

{grid.object}.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.

{grid.object}.deleteDetailViewRecord Method

Delete the record shown in the Detail View.

{grid.object}.deleteRow Method

Delete the record in the specified row of the Grid part.

{grid.object}.detailView Method

Display the Detail View for the specified row in the Grid part.

{grid.object}.detailViewFirstRecord Method

Navigate the record shown in the Detail View to the first record in the Grid.

{grid.object}.detailViewLastRecord Method

Navigate the record shown in the Detail View to the last record in the Grid.

{grid.object}.detailViewNewRecord Method

Put the Detail View into 'enter record mode' so that a new record can be added.

{grid.object}.detailViewNextRecord Method

Navigate the record shown in the Detail View to the next record in the Grid.

{grid.object}.detailViewPreviousRecord Method

Navigate the record shown in the Detail View to the previous record in the Grid.

{grid.object}.detailViewRefresh Method

Refresh the data shown in the Detail View by making an Ajax callback to get the current data in the database.

{grid.object}.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.

{grid.object}.dropDownMessage Method

Shows a dropdown message.

{grid.object}.dropDownMessageHide Method

Hides a dropdown message.

{grid.object}.editDetailViewRecord Method

If the Detail View 'RowEditStyle' is set to 'OnDemand', and the Detail View, puts the Detail View into edit mode.

{grid.object}.editField Method

If the Grid's 'RowEditStyle' is set to 'RowOnDemand', puts the specified row into edit mode.

{grid.object}.editFieldDV Method

If the Detail View's 'RowEditStyle' is set to 'RowOnDemand', puts the Detail View into edit mode.

{grid.object}.editRow Method

If the Grid's 'RowEditStyle' is set to 'RowOnDemand', puts the specified row into edit mode.

{grid.object}.fetchExplicitRecord Method

Adds a specified record to the Grid as the last record on the page.

{grid.object}.filterCheckedRows Method

If the 'checkbox' column in the Grid has been turned on, executes a search on the Grid that returns the checked records.

{grid.object}.getMapDataFromSearchPart Method

If the Search Part has a map control, allows you to read the data from search part.

{grid.object}.getParentObject Method

Returns a pointer to the parent object

{grid.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.

{grid.object}.getSelectedRow Method

Returns the selected row number, or null if no row is selected.

{grid.object}.getSessionVariable Method

Get the value of a session variable. The session variable must explicitly 'published' - see 'Published session variables' property in the Grid builder.

{grid.object}.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.

{grid.object}.getValue Method

Get the value of a control in the Grid, Search or Detail View part.

{grid.object}.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.

{grid.object}.gridFilterSet Method

Set an explicit filter and/or order for the Grid Component.

{grid.object}.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.

{grid.object}.gridQBERowToggle Method

Toggles the state of the Grid QBE row.

{grid.object}.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.

{grid.object}.gridUnlink Method

Unlink a Grid that was previously linked using the .gridLink() method.

{grid.object}.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.

{grid.object}.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.

{grid.object}.loadJavascript Method

Loads a string of Javascript code (typically function definitions).

{grid.object}.loadJavascriptFile Method

Loads Javascript from a file.

{grid.object}.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.

{grid.object}.loadXbasic Method

Loads Xbasic function definitions.

{grid.object}.openLookup Method

Opens the lookup Grid for a particular field.

{grid.object}.pageNavigate Method

Navigates to the specified page.

{grid.object}.populateDropdownBox Method

Populates the choices in a Dropdownbox control in the Grid or Detail View part.

{grid.object}.quickSearch Method

Performs a Quick Search for the specified value.

{grid.object}.quickSearchClear Method

Clears the current Quick Search filter.

{grid.object}.refresh Method

Refreshes the data shown in the Grid.

{grid.object}.refreshExternalTreeNavigator Method

Applies to a Tree Control Navigator. Causes the data in the tree control navigator to be refreshed.

{grid.object}.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.

{grid.object}.refreshRow Method

Refreshes the data in the specified Grid row.

{grid.object}.resetDetailView Method

Undoes all edits to the Detail View record and returns the record to is state before any edits were made.

{grid.object}.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.

{grid.object}.rowCollapse Method

Close the row expander for the specified row.

{grid.object}.rowExpand Method

Opens the row expander for the specified row.

{grid.object}.rowExpandToggle Method

Toggles the row expander for the specified row. If the row expander was closed, it is opened, and vice versa.

{grid.object}.runAction Method

Runs a Javascript Action for the Grid Component that was defined using the Action Script builder.

{grid.object}.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.

{grid.object}.setDetailViewGlobalError Method

Sets the error text for the Detail View Global Errors section.

{grid.object}.setErrors Method

Display error messages for fields in the Grid part.

{grid.object}.setFocus Method

Sets focus to the specified row number.

{grid.object}.setRowErrors Method

Sets the 'row error' for the specified row.

{grid.object}.setRowsPerPage Method

Sets the number of records per page to show in the Grid part.

{grid.object}.setSelectedRow Method

Sets focus to the specified row number.

{grid.object}.setStateInfo Method

Allows you to store arbitrary data in the Grid Component's 'state' object.

{grid.object}.setValue Method

Set the value of a control in the Grid, Search or Detail View part.

{grid.object}.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.

{grid.object}.showGridColumn Method

Shows or hides a Grid column.

{grid.object}.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.

{grid.object}.sort Method

The sort Method sort the Grid on the specified column number.

{grid.object}.submitDetailView Method

Submit the Detail View part to commit any edits that were made to the record shown in the Detail View.

{grid.object}.submitGridPart Method

Submit the Grid part to commit any edits that were made to the records shown in the Grid part. Contrast with the .submitGridPartRow() method which submits an individual Grid row.

{grid.object}.submitGridPartRow Method

Submits any edits that the user made to a particular row in the Grid.

{grid.object}.submitSearchForm Method

Submits the Search form and performs a search using the criteria that the user entered into the Search part form.

{grid.object}.toggleNewRecordRows Method

Toggles the display of new record rows in a Grid Component.