Interface GridOptions

Index

Properties

Methods

Properties

optional public beforeSelectionChange?: Function

Callback if you want to inspect something before selection, return false if you want to cancel the selection. return true otherwise. If you need to wait for an async call to proceed with selection you can use rowItem.changeSelection(event) method after returning false initially. Note: when shift+ Selecting multiple items in the grid this will only get called once and the rowItem will be an array of items that are queued to be selected.

optional public columnDefs?: ColumnDef[]

definitions of columns as an array [], if not defined columns are auto-generated. See github wiki for more details.

optional public columnWidth?: number

Column width of columns in grid.

optional public data?: KnockoutObservableArray

Data being displayed in the grid. Each item in the array is mapped to a row being displayed.

public displaySelectionCheckbox: boolean

Row selection check boxes appear as the first column.

optional public enableColumnResize?: boolean

Enable or disable resizing of columns

optional public enablePaging?: boolean

Enables the server-side paging feature

optional public enablePinning?: boolean

Enable column pinning

optional public enableRowReordering?: boolean

Enable drag and drop row reordering. Only works in HTML5 compliant browsers.

optional public enableRowSelection?: boolean

To be able to have selectable rows in grid.

optional public enableSorting?: boolean

Enables or disables sorting in grid.

optional public filterOptions?: FilterOptions

filterOptions - filterText: The text bound to the built-in search box. useExternalFilter: Bypass internal filtering if you want to roll your own filtering mechanism but want to use builtin search box.

optional public footerRowHeight?: number

Defining the height of the footer in pixels.

optional public footerVisible?: boolean

Show or hide the footer alltogether the footer is enabled by default

optional public groups?: Array<string>

Initial fields to group data by. Array of field names, not displayName.

optional public headerRowHeight?: number

The height of the header row in pixels.

optional public headerRowTemplate?: any

Define a header row template for further customization. See github wiki for more details.

optional public jqueryUIDraggable?: boolean

Enables the use of jquery UI reaggable/droppable plugin. requires jqueryUI to work if enabled. Useful if you want drag + drop but your users insist on crappy browsers.

optional public jqueryUITheme?: boolean

Enable the use jqueryUIThemes

optional public keepLastSelected?: boolean

Prevent unselections when in single selection mode.

optional public maintainColumnRatios?: any

Maintains the column widths while resizing. Defaults to true when using *'s or undefined widths. Can be ovverriden by setting to false.

optional public multiSelect?: boolean

Set this to false if you only want one item selected at a time

optional public pagingOptions?: PagingOptions

pagingOptions -

optional public plugins?: Plugin[]

Array of plugin functions to register in ng-grid

optional public rowHeight?: number

Row height of rows in grid.

optional public rowTemplate?: any

Define a row template to customize output. See github wiki for more details.

optional public selectWithCheckboxOnly?: boolean

Disable row selections by clicking on the row and only when the checkbox is clicked.

optional public selectedItems?: KnockoutObservableArray

all of the items selected in the grid. In single select mode there will only be one item in the array.

optional public showColumnMenu?: boolean

Enables menu to choose which columns to display and group by. If both showColumnMenu and showFilter are false the menu button will not display.

optional public showFilter?: boolean

Enables display of the filterbox in the column menu. If both showColumnMenu and showFilter are false the menu button will not display.

optional public showGroupPanel?: boolean

Show the dropzone for drag and drop grouping

optional public sortInfo?: any

Define a sortInfo object to specify a default sorting state. You can also observe this variable to utilize server-side sorting (see useExternalSorting). Syntax is sortinfo: { fields: ['fieldName1',' fieldName2'], direction: 'ASC'/'asc' || 'desc'/'DESC'}

optional public tabIndex?: number

Set the tab index of the Vieport.

optional public useExternalSorting?: boolean

Prevents the internal sorting from executing. The sortInfo object will be updated with the sorting information so you can handle sorting (see sortInfo)

Methods

optional public afterSelectionChange(row: Row)

Callback for when you want to validate something after selection.

Parameters