Component Events

Smart Data Source

onReady

Triggered after the Smart Data Source has been fully loaded. The event arguments provide the Smart Data Source instance. Usage:

Template:

<smart-data-source (on-ready)="onDataSourceReady($event)"></smart-data-source>

selectionChanged

Triggered when the Smart Data Source's selection has been changed. The event arguments provide the old and new selection. If there is no old selection, then oldSelection will have a null value. Similarly, if there is no new selection, newSelection will have a null value. Usage:

Template:

<smart-data-source (selection-changed)="handleSelectionChange($event)"></smart-data-source>

Component/Controller:

salesRepDataSource.selectionChanged.subscribe((ev: SelectionChangedEventArgs) => { console.log(ev.newSelection && ev.newSelection.RepName); });

stateChanged

Triggered when the Smart Data Source's state has changed. The event arguments provide a StateEvent, which could be: StateEvents.IDLE, StateEvents.UPDATING, StateEvents.ADDING_RECORD, StateEvents.READING, StateEvents.ERROR. The event arguments also provide data property, which (if applicable), contains any data associated with the event, or is left null if no such data exists. Usage:

Template:

Component/Controller:

 

Smart Filter

onFilter

Triggered when the filter button is clicked. The event arguments provide the filters being applied. Usage:

Template:

Component/Controller:

 

Smart Toolbar

addButtonClicked

Triggered when the add button is clicked.

Template:

Component/Controller:

saveButtonClicked

Triggered when the save button is clicked.

Template:

Component/Controller:

deleteButtonClicked

Triggered when the delete button is clicked.

Template:

Component/Controller:

cancelButtonClicked

Triggered when the cancel button is clicked.

Template:

Component/Controller:

nextButtonClicked

Triggered when the "next" navigation button is clicked.

Template:

Component/Controller:

previousButtonClicked

Triggered when the "previous" navigation button is clicked.
Template:

Component/Controller:

buttonClicked

Triggers when any button is clicked. The event arguments provide a string representing the name of the button (add, save, cancel, delete, previous, or next).

Usage:

Template:

Component/Controller:

 

Smart Viewer

inputValueChanged

Triggered when the value of an input contained within the Smart Viewer is changed. The event arguments provide the input DOM element, the DOM element id and the new value. In the case of Smart Lookups and Smart Combo Editors, the input value can also be an object. Usage:

Template:

Component/Controller:

 

Smart Grid

onCommandClicked

Fired when the user clicks a command button. The CommandButtonEventArgs class include the command name and the corresponding record.

Template:

Component/Controller:

 

onDoubleClicked

Fired when the user double clicks a row. The GridDoubleClickEvent class includes the selected index, and the selected record.

Template:

Component/Controller:

 

selectionChanged

Fired when the grid's selection has changed. The GridSelectionChangedEventArgs class includes the selection mode (single or multiple), number of selected rows, the selected items and the selected indexes.

Template:

Component/Controller:

 

Smart Lookup

beforePerformLookup

This event is triggered before a lookup call has been made. It filters the data by using SmartFilterDescriptor objects or ABL query strings.

Template:

Component/Controller:

IN