# Power Grid

(part of package '[Servoy NG-Grids](/reference/servoyextensions/packages/ui-component-packages/servoy-ng-grids.md)')\
Extends designtime/SolutionModel: [JSWebComponent](/reference/servoycore/dev-api/solutionmodel/jswebcomponent.md)\
Extends runtime: [RuntimeWebComponent](/reference/servoycore/dev-api/forms/runtimeform/elements/runtimewebcomponent.md)

Power Grid is an editable table component providing advanced functionality such as row grouping, pivoting, summaries and powerful analytics. It's data is loaded from a JSDataSet, and the changed data (if it is edited) can be exported back as a dataset.

This is a reference page; many components have detailed usage guides [here](https://docs.servoy.com/guides/develop/application-design/ui-components).

## Properties

### arrowsUpDownMoveWhenEditing

Defines action on TEXTFIELD editor for up/down arrow keys Type: [String](/reference/servoycore/dev-api/js-lib/string.md)

***

### checkboxSelection

When true the row has a checkbox for selecting/unselecting Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### columns

List all columns to be used in table as dataprovider Type: [Array\<CustomType\<aggrid-datasettable.column>>](#column)

***

### columnsAutoSizing

Auto sizing for columns. SIZE\_COLUMNS\_TO\_FIT: make the currently visible columns fit the screen. AUTO\_SIZE: the grid will work out the best width to fit the contents of the 'visible' cells in the column. NONE: no auto sizing action performed Type: [String](/reference/servoycore/dev-api/js-lib/string.md) Default Value: null

***

### columnsAutoSizingOn

Apply 'columnsAutoSizing' for these events even if 'continuousColumnsAutoSizing' is false Type: [CustomType\<aggrid-datasettable.columnsAutoSizingOn>](#columnsautosizingon)

***

### continuousColumnsAutoSizing

Apply 'columnsAutoSizing' whenever columns width are changed Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### customMainMenu

Menu items to append to the columns menu, beside the default aggrid menus. Type: [JSMenu](/reference/servoycore/dev-api/menus/jsmenu.md)

***

### editNextCellOnEnter

When true, pressing Enter during editing will automatically move to the next cell. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### enableColumnResize

Enables column resizing by user interaction. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: true

***

### enableSorting

Enable column sorting by clicking on the column's header Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: true

***

### enabled

When false, disables user interaction with the table. Type: [Enabled](/reference/servoy-developer/component_and_service_property_types.md#protected) Default Value: true

***

### gridOptions

Map where additional grid properties of ag-grid can be set Type: [Json](/reference/servoycore/dev-api/js-lib/json.md)

***

### groupMaxWidth

Maximum allowed width (in pixels) for group rows. Type: [Number](/reference/servoycore/dev-api/js-lib/number.md)

***

### groupMinWidth

Minimum allowed width (in pixels) for group rows. Type: [Number](/reference/servoycore/dev-api/js-lib/number.md) Default Value: 200

***

### groupRowRendererFunc

Function to customize group row rendering when gridOptions.groupDisplayType is set to 'groupRows' Type: [Clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)

***

### groupStyleClass

CSS style class applied to group rows. Type: [Styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)

***

### groupWidth

Fixed width (in pixels) for group rows. Type: [Number](/reference/servoycore/dev-api/js-lib/number.md) Default Value: 200

***

### headerHeight

The height (in pixels) of the table header. Type: [Number](/reference/servoycore/dev-api/js-lib/number.md) Default Value: 33

***

### iconConfig

Default icon configuration for grid controls. Type: [CustomType\<aggrid-datasettable.iconConfig>](#iconconfig)

***

### isEditableFunc

Callback that returns the editable state of a cell. Type: [Clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)

***

### localeText

Map where locales of ag-grid can be set Type: [Map](/reference/servoy-developer/component_and_service_property_types.md#map)

***

### mainMenuItemsConfig

Configuration options for main menu items in the grid. Type: [CustomType\<aggrid-datasettable.mainMenuItemsConfig>](#mainmenuitemsconfig)

***

### multiSelect

When true, multiple rows can be selected simultaneously. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### onDragGetImageFunc

Called when row(s) drag-n-drop is started, to get the drag image as an html code. Type: [Clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)

***

### onDragOverFunc

Callback when dragging over a row - returns one of the strings: 'copy', 'move', 'none' depending on the allowed drag operation. Type: [Clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)

***

### pivotMode

Pivoting allows you to take a columns values and turn them into columns Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### readOnly

When true, the table operates in read‑only mode. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### responsiveHeight

Table's height to be set in a responsive form. When responsiveHeight is set to 0, the table will use 100% height of the parent container. When responsiveHeight is set to -1, the table will auto-size it's height to the number of rows displayed inside the grid - in this case there is no vertical scrollbar and all rows are rendered Type: [Number](/reference/servoycore/dev-api/js-lib/number.md) Default Value: 300

***

### rowHeight

The height in pixels of the table's rows Type: [Number](/reference/servoycore/dev-api/js-lib/number.md) Default Value: 25

***

### rowStyleClassFunc

Function to add style class to row Type: [Clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)

***

### showColumnsMenuTab

When true, a dedicated columns menu tab is displayed. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### styleClass

Default CSS style class for the table. Type: [Styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass) Default Value: "ag-theme-alpine"

***

### tabSeq

The tab order index for keyboard navigation within the table. Type: [Tabseq](/reference/servoy-developer/component_and_service_property_types.md#tabseq)

***

### toolPanelConfig

Configuration options for the grid’s tool panel. Type: [CustomType\<aggrid-datasettable.toolPanelConfig>](#toolpanelconfig)

***

### useLazyLoading

When true, the table uses lazy loading to fetch data on demand. Type: [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) Default Value: false

***

### visible

Controls whether the table is visible. Type: [Visible](/reference/servoy-developer/component_and_service_property_types.md#visible)

***

## Events

### onCellClick(rowData,columnId,cellData,event,dataTarget)

Called when the mouse is clicked on a row/cell

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} rowData The data for the clicked row.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[columnId] The identifier of the clicked column.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} \[cellData] The data of the clicked cell.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event object associated with the click.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[dataTarget] Optional data target identifier.

***

### onCellDoubleClick(rowData,columnId,cellData,event,dataTarget)

Called when the mouse is double clicked on a row/cell

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} rowData The data for the double-clicked row.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[columnId] The identifier of the double-clicked column.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} \[cellData] The data of the double-clicked cell.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event object associated with the double-click.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[dataTarget] Optional data target identifier.

***

### onCellRightClick(rowData,columnId,cellData,event,dataTarget)

Called when the right mouse button is clicked on a row/cell

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} rowData The data for the right-clicked row.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[columnId] The identifier of the right-clicked column.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} \[cellData] The data of the right-clicked cell.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event object associated with the right-click.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[dataTarget] Optional data target identifier.

***

### onColumnDataChange(rowindex,columnindex,oldvalue,newvalue,event,rowData)

Called when the columns data is changed

**Parameters:**

> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} rowindex The index of the row where the change occurred.
> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} \[columnindex] The index of the column where the change occurred.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} \[oldvalue] The previous value of the cell.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} \[newvalue] The new value of the cell.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event that triggered the change.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} rowData The full data object for the row.

**Returns:** {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)}

***

### onColumnFormEditStarted(rowindex,columnindex,value)

Called when the column's form editor is started

**Parameters:**

> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} \[rowindex] The index of the row being edited.
> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} \[columnindex] The index of the column being edited.
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} \[value] The initial value of the cell for editing.

***

### onColumnStateChanged(columnState,event)

Called when the columns state is changed

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} columnState A JSON string representing the new state of the columns.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event that triggered the change.

***

### onCustomMainMenuAction(menuItemName,colId)

Called when a custom main menu item is chosen

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} menuItemName MenuItemName \[string] Chosen menu item name
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} colId

***

### onDrop(sourceRows,targetRow,event)

Called when a row is dropped as a result of a drag-n-drop

**Parameters:**

> * {[Array\<Object>](/reference/servoycore/dev-api/js-lib/object.md)} sourceRows An Array of plain objects if dragged from a power grid, or JSRecord objects if from a data grid
> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} targetRow The target row where the rows were dropped.
> * {[CustomType\<aggrid-datasettable.JSDNDEvent>](#jsdndevent)} event The event object associated with the drop action.

***

### onFooterClick(columnindex,event,dataTarget)

Called when the mouse is clicked on a footer cell

**Parameters:**

> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} \[columnindex] The index of the footer column that was clicked.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event object associated with the click.
> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[dataTarget] Optional target identifier for the click.

***

### onLazyLoadingGetRows(startRow,endRow,rowGroupCols,valueCols,pivotCols,pivotMode,groupKeys,filterModels,sortModels)

Called when lazy loading is used, and new rows are requested to display

**Parameters:**

> * {[Long](/reference/servoycore/dev-api/js-lib/number.md)} startRow The index of the first row to load.
> * {[Long](/reference/servoycore/dev-api/js-lib/number.md)} endRow The index of the last row to load.
> * {[Array\<CustomType\<aggrid-datasettable.columnVO>>](#columnvo)} rowGroupCols The columns used for grouping.
> * {[Array\<CustomType\<aggrid-datasettable.columnVO>>](#columnvo)} valueCols The columns used for values.
> * {[Array\<CustomType\<aggrid-datasettable.columnVO>>](#columnvo)} pivotCols The columns used for pivoting.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} pivotMode Indicates if pivot mode is enabled.
> * {[Array\<String>](/reference/servoycore/dev-api/js-lib/string.md)} groupKeys The keys representing the current grouping.
> * {[Array\<CustomType\<aggrid-datasettable.filterModelVO>>](#filtermodelvo)} filterModels The current filter models.
> * {[Array\<CustomType\<aggrid-datasettable.sortModelVO>>](#sortmodelvo)} sortModels The current sort models.

***

### onReady()

Called when the table is ready to be shown

***

### onRowGroupOpened(groupcolumnindexes,groupkeys,isopened)

Called when group is opened/closed

**Parameters:**

> * {[Array\<Number>](/reference/servoycore/dev-api/js-lib/number.md)} \[groupcolumnindexes] An array of column indexes associated with the group.
> * {[Array\<Object>](/reference/servoycore/dev-api/js-lib/object.md)} \[groupkeys] The keys representing the group hierarchy.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[isopened] True if the group was expanded, false if collapsed.

***

### onRowSelected(rowData,selected,event)

Called when the mouse is clicked on a row/cell

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} rowData The data for the clicked row.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} selected True if the row has been selected, false if deselected.
> * {[JSEvent](/reference/servoycore/dev-api/application/jsevent.md)} \[event] The event object associated with the click.

***

## API

### addAggCustomFuncs(aggFuncs)

Add custom aggregate functions.\
Ex.: addAggCustomFuncs({ myAggregate: '(function (valuesArray) { return myAggValueNumber })'})

**Parameters:**

> * {[Map](/reference/servoy-developer/component_and_service_property_types.md#map)} aggFuncs Object with properties names the aggregates name, and values the custom function as string

***

### appendLazyRequestData(dataset,lastRowIndex,pks)

When useLazyLoading is set, this method is used to append the new rows to the table from inside the onLazyLoadingGetRows callback.

The new rows are passed using a dataset.

"lastRowIndex" specifies the index of the last row on the server; if not set, the lazy loading will behave like an infinite scroll, and onLazyLoadingGetRows will be called called until "lastRowIndex" will be set

**Parameters:**

> * {[JSDataset](/reference/servoycore/dev-api/database-manager/jsdataset.md)} dataset The dataset containing the new rows to append to the table. The dataset's structure must align with the table's columns for proper data binding.
> * {[Long](/reference/servoycore/dev-api/js-lib/number.md)} \[lastRowIndex] The index of the last row available on the server. If not provided, lazy loading will function as infinite scrolling until this value is set.
> * {[Array\<String>](/reference/servoycore/dev-api/js-lib/string.md)} \[pks] List of dataprovider names; needed in case of using apis: updateRows and deleteRows

***

### autoSizeAllColumns()

Automatically adjusts the widths of all columns to fit their content.\
This method ensures that each column's width is sized according to the data it contains,\
without leaving extra unused space.

**Example:**

```js
// Auto-size all columns in the grid
powerGridInstance.autoSizeAllColumns();
```

***

### deleteColumn(id)

Removes column with id

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} id The unique identifier of the column to be removed from the component.

***

### deleteRows(rowsKey)

Delete rows - in order to work, pks needs to be set using renderData, and the rowsKey objects needs to have pk

**Parameters:**

> * {[Array\<Object>](/reference/servoycore/dev-api/js-lib/object.md)} rowsKey Delete rows

***

### editCellAt(rowindex,columnindex)

Start cell editing (only works when the table is not in grouping mode).

**Parameters:**

> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} rowindex Row index of the editing cell (0-based)
> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} columnindex Column index in the model of the editing cell (0-based)

***

### exportData(fileName,skipHeader,columnGroups,skipFooters,skipGroups,asCSV)

Export data to excel format (xlsx)

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[fileName] The name of the file to save the exported data to. If not provided, a default name will be used.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[skipHeader] If true, the headers of the table will be excluded from the exported file. Defaults to false.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[columnGroups] If true, includes column group information in the export. Defaults to false.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[skipFooters] If true, the footers of the table will be excluded from the exported file. Defaults to false.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[skipGroups] If true, group rows will be excluded from the exported file. Defaults to false.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[asCSV] If true, the data will be exported in CSV format instead of XLSX. Defaults to false.

***

### exportToDataset()

Export data to JSDataSet

**Returns:** [JSDataset](/reference/servoycore/dev-api/database-manager/jsdataset.md) A dataset object containing the exported grid data, where the first row represents

***

### getAllColumns()

Returns all the columns

**Returns:** [Array\<CustomType\<aggrid-datasettable.column>>](#column) An array of all column objects currently defined in the table.

***

### getColumn(id,forChange)

Gets the column with id. If changes will be made on the returned column, it should be called with forChange set to true

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} id The unique identifier of the column to retrieve in the Servoy grid.
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[forChange] Indicates whether the column is being retrieved for modifications.

**Returns:** [CustomType\<aggrid-datasettable.column>](#column) The column object at the specified index.

***

### getColumnState()

Returns the current state of the columns (width, position, grouping state) as a json string that can be used to restore to this state using restoreColumnState

**Returns:** [String](/reference/servoycore/dev-api/js-lib/string.md) A JSON string representing the current state of the columns, including their width, position, and grouping state.

***

### getExpandedGroups()

Returns currently expanded groups as an object like:\
{expandedGroupName1:{}, expandedGroupName2:{expandedSubGroupName2\_1:{}, expandedSubGroupName2\_2:{}}}

**Returns:** [Object](/reference/servoycore/dev-api/js-lib/object.md) An object representing the currently expanded groups in the table.

***

### getSelectedRows()

Gets selected rows data

**Returns:** [Array\<Object>](/reference/servoycore/dev-api/js-lib/object.md) An array of objects representing the data of the currently selected rows in the table.

***

### isPivotMode()

Returns pivot mode state

**Returns:** [Boolean](/reference/servoycore/dev-api/js-lib/boolean.md) True if the pivot mode is currently enabled, otherwise false.

***

### moveColumn(id,index)

Move column

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} id Column id
> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} index New position (0-based)

***

### newColumn(id,index)

Adds new column at specified index. Index is 0 based.

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} id The unique identifier for the new column to be added.
> * {[Number](/reference/servoycore/dev-api/js-lib/number.md)} \[index] 0-based index

**Returns:** [CustomType\<aggrid-datasettable.column>](#column) The column object that was created and added to the table.

***

### newRows(rowsData,appendToBeginning)

Create new rows

**Parameters:**

> * {[Array\<Object>](/reference/servoycore/dev-api/js-lib/object.md)} rowsData New rows
> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[appendToBeginning] If true rows will be added to the beginning of the table

***

### renderData(dataset,pks)

Fills the table with data from a dataset.\
The column name from the dataset is used to match on the component column id

**Parameters:**

> * {[JSDataset](/reference/servoycore/dev-api/database-manager/jsdataset.md)} \[dataset] The dataset containing the data to populate the table. The dataset's column names must match the component's column IDs to bind data correctly.
> * {[Array\<String>](/reference/servoycore/dev-api/js-lib/string.md)} \[pks] List of dataprovider names; needed in case of using apis: updateRows and deleteRows

***

### restoreColumnState(columnState)

Restore columns state to a previously save one, using getColumnState.\
If no argument is used, it restores the columns to designe time state.\
It won't re-create deleted columns.

**Parameters:**

> * {[String](/reference/servoycore/dev-api/js-lib/string.md)} \[columnState] A JSON string representing the saved state of the columns, including width, position, and grouping state. If not provided, the columns will be restored to their design-time state.

***

### scrollToRow(rowData)

Scroll viewport to matching row

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} rowData RowData with at least on attribute, used to find the viewport row to scroll to

***

### setExpandedGroups(groups)

Sets expanded groups

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} groups An object like {expandedGroupName1:{}, expandedGroupName2:{expandedSubGroupName2\_1:{}, expandedSubGroupName2\_2:{}}}

***

### setFormEditorValue(value)

Set the currently opened form editor value

**Parameters:**

> * {[Object](/reference/servoycore/dev-api/js-lib/object.md)} value Form editor value

***

### setSelectedRows(rowIndexes)

Sets selected rows

**Parameters:**

> * {[Array\<Number>](/reference/servoycore/dev-api/js-lib/number.md)} rowIndexes An array of 0-based row indexes to be selected in the table.

***

### sizeColumnsToFit()

Adjusts the columns' widths to fit the available viewport, ensuring that all visible columns are resized to fill the table's width.\
This method dynamically resizes columns to ensure no empty space remains in the grid's horizontal viewport.

**Example:**

```js
elements.myTable.sizeColumnsToFit();
```

***

### stopCellEditing(cancel)

If a cell is editing, it stops the editing

**Parameters:**

> * {[Boolean](/reference/servoycore/dev-api/js-lib/boolean.md)} \[cancel] 'true' to cancel the editing (ie don't accept changes)

***

### updateRows(rowsData)

Update rows - in order to work, pks needs to be set using renderData, and the rowData objects needs to have pk

**Parameters:**

> * {[Array\<Object>](/reference/servoycore/dev-api/js-lib/object.md)} rowsData Update rows

***

## Types

## JSDNDEvent

Drag and drop event type scripting type: CustomType\<aggrid-datasettable.JSDNDEvent>

extends: [JSEvent](#jsevent)

* sourceColumnId
  * Drag source column id.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* sourceGridName
  * Name of the grid that with the drag source.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* targetColumnId
  * Drop target column id.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)

## aggFuncInfo

Information about an aggregation function used in the grid. scripting type: CustomType\<aggrid-datasettable.aggFuncInfo>

* aggFunc
  * The aggregation function implementation.
  * **Type**: [clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)
* name
  * The name of the aggregation function.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)

## column

Defines a column configuration for the grid. scripting type: CustomType\<aggrid-datasettable.column>

* aggFunc
  * Name of function to use for aggregation
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
  * **Default Value**: ""
* autoResize
  * Enables auto-resizing of the column based on its content.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* cellRendererFunc
  * Function to change the cell rendering
  * **Type**: [clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)
* cellStyleClassFunc
  * Function to determine the CSS style class for the cell dynamically.
  * **Type**: [clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)
* columnDef
  * Map where additional column properties of ag-grid can be set
  * **Type**: [json](/reference/servoycore/dev-api/js-lib/json.md)
* dataprovider
  * The data provider name associated with the column.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* dndSource
  * Allow dragging
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* dndSourceFunc
  * Boolean function for allow/disallow dragging.
  * **Type**: [clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)
* editForm
  * Form used as custom editor
  * **Type**: [form](/reference/servoy-developer/component_and_service_property_types.md#form)
* editFormSize
  * Size configuration for the custom cell editor form.
  * **Type**: [dimension](https://github.com/Servoy/gitbook/blob/master/reference/servoycore/dev-api/js-lib/dimension.md)
  * **Default Value**: {"width":300,"height":200}
* editType
  * Type of editing used for that column
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* enableBrowserContextMenu
  * When true the browser context menu is shown
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* enablePivot
  * If the column can be used as pivot
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* enableResize
  * Enables resizing for this column.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* enableRowGroup
  * Allow the user to group or ungroup the column
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* enableSort
  * Enables sorting for this column.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* enableToolPanel
  * When true, the column is available in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* excluded
  * When true the column is excluded from the UI
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* exportDisplayValue
  * If exportData api should export the display value (with format applied) instead of the raw data of the dataset
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* filterType
  * The type of filter applied to this column.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* footerStyleClass
  * CSS style class for the column footer.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* footerText
  * The text to be displayed in the column footer.
  * **Type**: [tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)
* format
  * Format for the type set in formatType
  * **Type**: [format](/reference/servoy-developer/component_and_service_property_types.md#format)
* formatType
  * Type of data the format is applied on
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
  * **Default Value**: "TEXT"
* headerGroup
  * Header group, that this column will be part of
  * **Type**: [tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)
* headerGroupStyleClass
  * CSS style class for the header group.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* headerIconStyleClass
  * (Font awesome) Styles for header icon
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* headerStyleClass
  * CSS style class for the column header.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* headerTitle
  * The title text to be displayed in the column header.
  * **Type**: [tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)
* headerTooltip
  * Tooltip text for the column header.
  * **Type**: [tagstring](/reference/servoy-developer/component_and_service_property_types.md#tagstring)
* id
  * Used to set the column id (colId) property in the serialized column state json string of getColumnState and onColumnStateChanged
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* maxWidth
  * The maximum width allowed for the column in pixels.
  * **Type**: [int](/reference/servoycore/dev-api/js-lib/number.md)
* minWidth
  * The minimum width allowed for the column in pixels.
  * **Type**: [int](/reference/servoycore/dev-api/js-lib/number.md)
* pivotComparatorFunc
  * Function to sort the pivot columns
  * **Type**: [clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)
* pivotIndex
  * Set this in columns you want to pivot by
  * **Type**: [int](/reference/servoycore/dev-api/js-lib/number.md)
  * **Default Value**: -1
* rowGroupIndex
  * Set the rowGroupIndex to group on the column; the index defines the order of the group when there are multiple grouped columns
  * **Type**: [int](/reference/servoycore/dev-api/js-lib/number.md)
  * **Default Value**: -1
* showAs
  * Alternative display mode for the column.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* styleClass
  * CSS style class for the cell.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* tooltip
  * Tooltip text for the cell.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* valueGetterFunc
  * Proxy function for getting the cell value from the model
  * **Type**: [clientfunction](/reference/servoy-developer/component_and_service_property_types.md#clientfunction)
* valuelist
  * Value list for mapping the column's values.
  * **Type**: [valuelist](/reference/servoy-developer/component_and_service_property_types.md#valuelist)
* valuelistConfig
  * Configuration settings for the value list.
  * **Type**: [valuelistConfig](/reference/servoy-developer/component_and_service_property_types.md#valuelistConfig)
* visible
  * Visibility flag; when false the column is hidden.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* width
  * The width of the column in pixels.
  * **Type**: [int](/reference/servoycore/dev-api/js-lib/number.md)
  * **Default Value**: 0

## columnVO

Represents a simplified column value object used in the grid. scripting type: CustomType\<aggrid-datasettable.columnVO>

* aggFunc
  * The aggregation function associated with the column.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* displayName
  * The display name for the column.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* id
  * Unique identifier of the column.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)

## columnsAutoSizingOn

Events that trigger auto-sizing of columns. scripting type: CustomType\<aggrid-datasettable.columnsAutoSizingOn>

* columnResize
  * Apply 'columnsAutoSizing' when columns are resized
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* columnRowGroupChange
  * Apply 'columnsAutoSizing' when row grouping is changed
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* displayedColumnsChange
  * Apply 'columnsAutoSizing' when columns are added/removed
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* gridReady
  * Apply 'columnsAutoSizing' when grid is ready to be shown
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* gridSizeChange
  * Apply 'columnsAutoSizing' when grid size changes
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* toolPanelVisibleChange
  * Apply 'columnsAutoSizing' when the toolpanel visibility is changed
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true

## filterModelVO

Model representing a filter applied to a column. scripting type: CustomType\<aggrid-datasettable.filterModelVO>

* id
  * The unique identifier of the filter.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* operator
  * The operator used in the filter (e.g., '=', '>', '<').
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* value
  * The value used for filtering.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)

## iconConfig

Icon configuration for grid components. scripting type: CustomType\<aggrid-datasettable.iconConfig>

* iconCheckboxChecked
  * Icon for a checked checkbox.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconCheckboxCheckedReadOnly
  * Icon for a read-only checked checkbox.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconCheckboxIndeterminate
  * Icon for an indeterminate checkbox state.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconCheckboxIndeterminateReadOnly
  * Icon for a read-only indeterminate checkbox.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconCheckboxUnchecked
  * Icon for an unchecked checkbox.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconCheckboxUncheckedReadOnly
  * Icon for a read-only unchecked checkbox.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconClipboardCopy
  * Icon for copying to the clipboard.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconClipboardPaste
  * Icon for pasting from the clipboard.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnGroupClosed
  * Icon for a closed column group.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnGroupOpened
  * Icon for an open column group.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveAdd
  * Icon for adding a column.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveGroup
  * Icon for grouping columns.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveHide
  * Icon for hiding a column.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveLeft
  * Icon for moving a column to the left.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveMove
  * Icon for moving a column.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMovePin
  * Icon for pinning a column.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMovePivot
  * Icon for pivoting a column.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveRight
  * Icon for moving a column to the right.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnMoveValue
  * Icon for moving a column's value.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnSelectClosed
  * Icon for a closed column selection.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumnSelectOpen
  * Icon for an open column selection.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconColumns
  * Icon representing the columns panel.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconDropNotAllowed
  * Icon indicating that a drop operation is not allowed.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconEditorChecked
  * Icon for a checked state in an editor.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconEditorUnchecked
  * Icon for an unchecked state in an editor.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconFilter
  * Icon for filtering functionality.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconGroupContracted
  * Icon representing a collapsed group.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconGroupExpanded
  * Icon representing an expanded group.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconMenu
  * Icon for the grid menu.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconMenuAddRowGroup
  * Icon for adding a row group via the menu.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconMenuPin
  * Icon for pinning via the menu.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconMenuRemoveRowGroup
  * Icon for removing a row group via the menu.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconMenuValue
  * Icon for displaying values in the menu.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconPivotPanel
  * Icon for the pivot panel.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconRefreshData
  * Icon for refreshing grid data.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
  * **Default Value**: "glyphicon glyphicon-refresh"
* iconRowGroupPanel
  * Icon for the row group panel.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconSortAscending
  * Icon indicating ascending sort order.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconSortDescending
  * Icon indicating descending sort order.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconSortUnSort
  * Icon indicating an unsorted column.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)
* iconValuePanel
  * Icon for the value panel.
  * **Type**: [styleclass](/reference/servoy-developer/component_and_service_property_types.md#styleclass)

## mainMenuItemsConfig

Configuration options for the main menu items in the grid. scripting type: CustomType\<aggrid-datasettable.mainMenuItemsConfig>

* autoSizeAll
  * Option to auto-size all columns.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* autoSizeThis
  * Option to auto-size the current column.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* columnChooser
  * Option to show the column chooser.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* columnFilter
  * Option to show the column filter.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* contractAll
  * Option to collapse all groups in the grid.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* expandAll
  * Option to expand all groups in the grid.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* pinSubMenu
  * Configuration for the pin sub-menu.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* resetColumns
  * Option to reset columns to their default state.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* rowGroup
  * Option to group rows by this column.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* rowUnGroup
  * Option to ungroup rows.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: true
* sortAscending
  * Option to sort the column in ascending order.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* sortDescending
  * Option to sort the column in descending order.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* sortUnSort
  * Option to clear the sort on the column.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* valueAggSubMenu
  * Configuration for the value aggregation sub-menu.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false

## rowInfo

Information about a row in the grid. scripting type: CustomType\<aggrid-datasettable.rowInfo>

* rowData
  * The data object for the row.
  * **Type**: [object](/reference/servoycore/dev-api/js-lib/object.md)
* rowIndex
  * The index of the row in the grid.
  * **Type**: [int](/reference/servoycore/dev-api/js-lib/number.md)

## sortModelVO

Model representing the sorting state for a column. scripting type: CustomType\<aggrid-datasettable.sortModelVO>

* colId
  * The column identifier to which this sorting model applies.
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)
* sort
  * The sort direction ('asc' for ascending, 'desc' for descending).
  * **Type**: [string](/reference/servoycore/dev-api/js-lib/string.md)

## toolPanelConfig

Configuration options for the grid's tool panel. scripting type: CustomType\<aggrid-datasettable.toolPanelConfig>

* suppressColumnExpandAll
  * When true, the option to expand all columns is suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressColumnFilter
  * When true, the column filter is suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressColumnSelectAll
  * When true, the option to select all columns is suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressPivotMode
  * When true, the pivot mode option is suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressPivots
  * When true, pivot options are suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressRowGroups
  * When true, row groups are suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressSideButtons
  * When true, side buttons in the tool panel are suppressed.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false
* suppressValues
  * When true, values are suppressed in the tool panel.
  * **Type**: [boolean](/reference/servoycore/dev-api/js-lib/boolean.md)
  * **Default Value**: false

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/reference/servoyextensions/ui-components/grids/power-grid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
