Skip to main content
Version: 11.2

$.udb(ds).on()

note

This article is about the on() function of the DataSourceContainer object.

$.udb(ds).on()

Binds a handler to an event for the data sources in the collection.

Returns a UdbDsc object which is an array of UdbDataSource objects.

Syntax

$.udb( *ds* ).on( *eventType*, *data*, *handler*(*event*) )

The optional ds is a data source selector.

The required eventType is a string that identifies the event to bind to. The possible values for the 'eventType' parameter are described in the Events reference section.

The optional data is a key-value map that contains certain data options to be passed to the event as its events.data object.

The required handler(event) is a function that is called when the event occurs.

Example

$.udb('EMP').on('rowselect', (event, options) => {
// ...
});