copyToClipboard ( )

setColumnValueOptions ( )

setStorageMode ( )

getStorageMode ( )

addRecord ( item: Record , opts: Object )

Adds the specified record to the DataGrid.

Parameters
Name Type Description
item Record The record to add.
opts Object Optional options object with callbacks for when the operation is done.
Properties
NameTypeDescription
onSuccessFunctionCallback function if the operation was successful.
onErrorFunctionCallback function if the operation resulted in an error.

blur ( )

Triggers the blur event.

commit ( )

Saves changes made to the records held by the DataGrid.

deleteRecord ( item: Record , opts: Object )

Deletes the specified record from the DataGrid

Parameters
Name Type Description
item Record The record to delete.
opts Object Optional options object with callbacks for when the operation is done.
Properties
NameTypeDescription
onSuccessFunctionCallback function if the operation was successful.
onErrorFunctionCallback function if the operation resulted in an error.

deselectAll ( )

Deselects all rows.

deselectRows ( rowNumbers: Array<Number>)

Deselects the specified rows.

Parameters
Name Type Description
rowNumbers Array<Number> The numbers of the rows to deselect (starting at row 0 at the top).

enableEdit ( enable: Boolean )

Enables or disables editing of the DataGrid's cells.

Parameters
Name Type Description
enable Boolean Specifies whether to enable or disable editing.

focus ( )

Triggers the focus event.

get ( name: String ) →{ Object }

Gets the value of the specified property.

Parameters
Name Type Description
name String The name of the property.
Returns

The property's value.

getActiveRecord ( ) →{ Record }

Returns the currently selected record.

Returns

The currently selected record.

getActiveRecordID ( ) →{ ID }

Returns the ID of the currently selected record.

Returns

The ID of the currently selected record.

getAllRecords ( opts: Object ) →{ Array<Record> }

Returns all of the DataGrid's records.

Parameters
Name Type Description
opts Object Optional options object configuring the operation.
Properties
NameTypeDescription
loadBooleanIf true, will attempt load records from the database in addition to the currently displayed records.
sortBooleanEnables sorting of records received from the database (note: requires opts.load to be true).
onSuccessFunctionCallback function if the load operation was successful (note: requires opts.load to be true).
onErrorFunctionCallback function if the load operation resulted in an error (note: requires opts.load to be true).
Returns

Array holding all of the DataGrid's records. If opts.load is enabled, this will return null and the records will be returned through the callback functions instead.

getColumns ( ) →{ Array }

Returns the DataGrid's columns.

Returns

An array holding all of the DataGrid's columns

getId ( ) →{ ID }

Returns the ID of the widget.

Returns

The ID of the widget

getQuery ( ) →{ Query }

Returns the query used to populate the DataGrid

Returns

The query used to populate the DataGrid

getRecord ( id: ID)

Returns the record with the specified id.

Parameters
Name Type Description
id ID ID of the desired record.

getSelectedRecords ( idsOnly: Boolean ) →{ Array<Record> | Array<ID> }

Returns the currently selected records.

Parameters
Name Type Description
idsOnly Boolean If true, only ID's will be returned.
Returns

An array holding the currently selected records, or an array holding the ID's of the currently selected records (if idsOnly was true).

getValue ( ) →{ Object }

Returns the widget's value.

Returns

The widget's value.

hide ( )

Hides the widget.

isEnabled ( ) →{ Boolean }

Returns true if the widget is enabled.

Returns

True if enabled, otherwise false.

isHidden ( ) →{ Boolean }

Returns true if the widget is hidden.

Returns

True if hidden, otherwise false.

isRowSelected ( rowId: String ) →{ Boolean }

Checks if a row is currently selected.

Parameters
Name Type Description
rowId String The id of the row to check.
Returns

True if the row is selected, false otherwise.

newRecord ( item: Object )

Creates a new record using the specified data.

Parameters
Name Type Description
item Object Data to use for the new record.

refresh ( )

Refreshes the DataGrid

rollback ( )

Reverts changes made to the records held by the DataGrid.

selectAll ( )

Selects all rows.

selectRows ( rowNumbers: Array<Number>)

Selects the specified rows.

Parameters
Name Type Description
rowNumbers Array<Number> The numbers of the rows to select (starting at row 0 at the top).

set ( name: String , value: Object )

Sets the value of the specified property.

Parameters
Name Type Description
name String The name of the property.
value Object The new value.

setColumnHeader ( colId: Number , header: String )

Changes the header text of a column

Parameters
Name Type Description
colId Number 0 based index of the column or the columns current header text
header String The new header text for the column

setEnabled ( Enabled: Boolean )

Enables/disables the widget.

Parameters
Name Type Description
Enabled Boolean True to enable the widget, false to disable.

setQuery ( query: Query)

Sets the query used for fetching records into this grid

Parameters
Name Type Description
query Query query The query to use

setRecords ( records: Array<Record>) →{ Promise }

Sets the records displayed by the DataGrid to the specified array of records.

Parameters
Name Type Description
records Array<Record> records The records to display.

setRowData ( rowId: String , data: Object )

Sets the data of the specified row.

Parameters
Name Type Description
rowId String The id of the row to change.
data Object The new data.

setStyle ( Object: Object )

Set the widget-style

Parameters
Name Type Description
Object Object properties

setValue ( value: Object )

Sets the widget's value.

Parameters
Name Type Description
value Object The new value.

show ( )

Shows the widget.

toggleCellHighlight ( colId: Number , highlightStyle: Object )

Toggles highlight of a cell in the currently active row

Parameters
Name Type Description
colId Number 0 based index of the column or the columns current header text
highlightStyle Object Style object to use as the highlight for the cell

updateRecord ( record: Record )

Update a record in the grid

Parameters
Name Type Description
record Record record The record to be updated.