Events

Top  Previous  Next

Events are used to customise the behaviour of the control. The following client-side events can be assigned a client-side method  using the bind method. All the handlers are passed as the first argument a reference to the control that fired the event. Some events are passed an object as a second argument that contains properties that are related to that particular event. Those events which are cancelable contain a cancel property which can be set to true to suppress the related behavior. For example setting the cancel property for the onBeforeFileDeleted event will suppress the deletion of the file.

onBeforeDocumentDisplayed

Fired before a file is displayed in a window (fileSelectionAction = Display)

Arguments

control

object

Reference to DbNetFile control

onBeforeFileDeleted

Fired before a file is deleted and can be used to validate the deletion. Setting the cancel property to false in the handler will suppress the deletion. Information about the file can be accessed via the fileInfo object

Arguments

control

object

Reference to DbNetFile control

args

object

Contains the following properties

cancel

boolean

Set to true if validation fails

message

string

Message to be displayed for failed validation

fileInfo

object

File information for the file to be deleted

onBeforeFileSelected

Fired before a file is selected and can be used to suppress the selection. Setting the cancel property to false in the handler will suppress the selection. Information about the file can be accessed via the fileInfo object

Arguments

control

object

Reference to DbNetFile control

args

object

Contains the following properties

cancel

boolean

Set to true to suppress file from being selected

message

string

Message to be displayed for failed selection

fileInfo

object

File information for the selected file

Run Sample

onBeforeInitialized

Fired just before the control is initialized for the first time.

Arguments

control

object

Reference to DbNetFile control

onCellTransform

Fired for each cell in the display after the page has been loaded and can be used to customise the information displayed in the control. Information about the file can be accessed via the fileInfo object

Arguments

control

object

Reference to DbNetFile control

args

object

Contains the following properties

cell

object

Reference to the cell object. Cell contains the attribute columnType that can be used to relate the cell to the column type.

fileInfo

object

File information for the file

onFileUploaded

This event is fired after a file has been uploaded.

Arguments

control

object

Reference to DbNetEdit control

args

object

Contains the following properties

fileName

string

The name of the file that was uploaded

Run Sample

onFolderSelected

Fired when a folder is selected.

Arguments

control

object

Reference to DbNetFile control

onInitialized

Fired after the control is initialized.

Arguments

control

object

Reference to DbNetFile control

onPageLoaded

Fired after a page of data is loaded.

Arguments

control

object

Reference to DbNetFile control

onRowSelected

Fired after a row is selected

control

object

Reference to DbNetFile control

args

object

Contains the following properties

row

object

Reference to the selected row.

fileInfo

object

File information for the selected row