GridControl

Purpose

GridControl is a client-side JavaScript object that represents a grid control on an application page.

Access a GridControl in one of two ways:

Interface

The GridControl component has the following public interface:

  • addEventListener(eventType,handler) — Registers an event listener for the given event type
  • addGridRow() — Adds a new grid row to the GridControl
  • deleteGridRow(rowIndex) — Removes the GridRow at the specified row index
  • getContentElement() — Returns a jQuery object for the root element housing the GridControl component
  • getFieldCell(rowIndex, fieldName) — Returns a jQuery object of the field container element where the field is identified by rowIndex and fieldName
  • getGridControlSectionToolbarEl() — Returns a jQuery object for the GridControl section toolbar element
  • getGridControlToolbar() — Returns a jQuery object for the GridControl toolbar element
  • getGridControlToolbarEl() — Returns a Kendo Toolbar configuration object for the GridControl toolbar
  • getGridNumber() — Returns the order of the GridControl component on the page
  • getGridRow(rowIndex) — Returns the GridRow object at the specified row index, where rowIndex is the number of the row (the first row has the rowIndex of 0). See GridRow for more information.
  • getId() — Returns the GridControl component's PageCell's ID
  • getKendoConfig() — Returns the Kendo Grid configuration object for the GridControl component
  • getLastModifiedField() — Returns the FieldContext object of the last modified field. See FieldContext for more information.
  • getMaxRowIndex() — Returns the number of grid rows in the GridControl component
  • getOriginalId() — Returns the GridControl component's PageCell's originalID
  • removeEventListener(eventType,handler) — Unregisters an event listener for the specified eventType
  • showGridTotals() — Computes and shows grid totals for each TotalBy column in the GridControl component
  • sumGridColumn(fieldName) — Computes and shows the grid total for the specified GridControl column as identified by fieldName

Example

The following example returns the original ID of the first grid control on the page.

<script>
	rbf_getGridControlComponent(0).getOriginalId();
</script>