Bewerken

Delen via


GridControl (Client API reference)

GridControl or the gridContext is the instance of grid or subgrid on a form against which you want to execute your script. Use the form context to get GridControl (gridContext) on a form.

Methods for grids

Name Description Available for
addOnLoad Adds event handlers to the Subgrid OnLoad event event. Read-only grid
getEntityName Gets the logical name of the table data displayed in the grid. Read-only and editable grids
getFetchXml Gets the FetchXML query that represents the current data, including filtered and sorted data, in the grid control. Read-only and editable grids
getGrid Get access to the Grid available in the GridControl (gridContext). Read-only and editable grids
getGridType Gets the grid type (grid or subgrid). Read-only and editable grids
getRelationship Gets information about the relationship used to filter the subgrid. Read-only and editable grids
getUrl Gets the URL of the current grid control. Read-only and editable grids
getViewSelector Use this method to access the ViewSelector methods available for the grid control. Read-only grid
openRelatedGrid Displays the associated grid for the grid. Read-only and editable grids
refresh Refreshes the grid. Read-only and editable grids
refreshRibbon Refreshes the ribbon rules for the grid control. Read-only and editable grids
removeOnLoad Removes event handlers from the Subgrid OnLoad event event. Read-only grid

Additional methods for subgrids

Along with the methods mentioned above, subgrid also have the following methods:

Name Description Available for
getControlType Returns a value that categorizes controls. Read-only and editable grids
getDisabled Returns whether the control is disabled. Read-only and editable grids
getName Returns the name assigned to the control. Read-only and editable grids
getParent Returns a reference to the section object that contains the control. Read-only and editable grids
getVisible Returns a value that indicates whether the control is currently visible. Read-only and editable grids
setDisabled Sets whether the control is disabled. Read-only and editable grids
setFocus Sets the focus on the control. Read-only and editable grids
setVisible Sets a value that indicates whether the control is visible. Read-only and editable grids

Grid
Grids and subgrids in model-driven apps