Skip to main content

grid-pro.genesisgriddatasourceelement

Home > @genesislcap/grid-pro > GenesisGridDatasourceElement

GenesisGridDatasourceElement class​

The base datasource element for the grid-pro element.

Signature:

export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceElement_base 

Extends: GenesisGridDatasourceElement_base

Properties​

Property

Modifiers

Type

Description

connect

Connect

criteria

string

Groovy expression to perform filters on the query server; these remain active for the life of the subscription.

criteriaFromFilters

protected

Map<string, string>

datasource

Datasource

defaultRowIdByResourceType

protected

readonly

string

deferredColumnStates

ColumnState[]

deferredGridOptions

GridOptions

disablePolling

boolean

Disables polling if set to true (data updates for the grid will not be fetched automatically).

fields

string

Optional parameter that allows you to select a subset of fields from the query if the client is not interested in receiving all of them.

isRequestServer

readonly

boolean

isSnapshot

boolean

Request a snapshot from the server.

maxRows

number

Maximum number of rows to be returned as part of the initial message, and as part of any additional MORE_ROWS messages.

maxView

number

Maximum number of rows to track as part of a client "view".

movingView

boolean

If true, when the maximum number of rows defined in max-view is reached, the Data Server will start discarding the oldest rows (in terms of timestamp) and sending newer rows.

offset

number

The offset for pagination in REQUEST_SERVER scenarios.

orderBy

string

Option to select a Data Server index (defined in the Data Server query), which is especially useful if you want the data to be sorted in a specific way.

pollingInterval

number

Custom polling frequency (in milliseconds) for a Request Server resource.

pollTriggerEvents

string[]

Array of event names that will trigger a poll when received as commit responses.

request

any

Similar to fields but for Request Server scenarios. This optional parameter enables you to specify request fields, which can include wildcards.

requestAutoSetup

boolean

Attribute to set whether the REQUEST object should be automatically set up.

resourceName

string

The name of the target Data Server query or Request Server requestReply.

restartOnReconnection

boolean

Attribute to set whether the datasource should restart when it reconnects.

reverse

boolean

Option that changes the Data Server index iteration.

rowDataMapper

Function

Allows grid data updates to be processed via and external function before applying in grid

rowIdAttr

any

Attribute to set an unique identifier for the row.

Defaults to ROW_REF or RECORD_ID depending on the resource type.

update

protected

BehaviorSubject<Map<string, string>>

viewNumber

number

The desired view/page you want data from.

Methods​

Method

Modifiers

Description

clearErrors()

Clears error state and emits connected event.

datasourceOptions()

protected

datasourceStatusChanged(prev, next)

handleErrors(errors, type)

Handles errors and emits appropriate error events.

removeFilter(fieldName)

setFilter(fieldName, newFilter)