Default event handlers

Default event handlers for the Web DataWindow control are contained in the PBDataWindow.js file that deploys with your application to the applicationName\Scripts directory under the server’s virtual root. The default event handlers typically cause a postback or delayed postback to the corresponding server-side event. Default event handlers can call more than one server-side event, but each default event handler name includes a reference to the main event that it handles.

The choice of handlers that attach to each event follows the logic described by Table 3-1. The table also indicates whether the event handler causes a postback, a delayed postback, or no postback.

If you call a customized client-side event handler, the default event handler does not get invoked, postbacks are not made to the server, and the corresponding server-side event does not get triggered. You can explicitly call a default event handler from a customized event handler if you want to trigger the corresponding server-side event. When you call a default event handler directly in a JavaScript function, you must use the same arguments and return value that you would for the principal client-side event that it handles.

For information on client-side event signatures, see the event descriptions under “Alphabetical list of Web DataWindow client-side events”.

Table 3-1: List of default event handlers by event type

Client-side Event

Default JavaScript handler (postback action)

Used under the following conditions for server-side events:

Clicked

PBDataWindow_Clicked (postback)

Clicked is handled, but DoubleClicked is not

Clicked and ButtonClicked are handled, but DoubleClicked is not

Clicked and ButtonClicking is handled, but DoubleClicked is not

PBDataWindow_DelayedClicked (delayed postback)

Clicked and DoubleClicked are handled

Clicked, DoubleClicked, and ButtonClicked are handled

Clicked, DoubleClicked, and ButtonClicking are handled

PBDataWindow_ClickedDifferentRow (postback)

RowFocusChanging is handled, but Clicked and DoubleClicked are not

RowFocusChanged is handled, but Clicked and DoubleClicked are not

PBDataWindow_DelayedClickedDifferentRow (delayed postback)

RowFocusChanging and DoubleClicked are handled, but Clicked is not

RowFocusChanged and DoubleClicked are handled, but Clicked is not

DoubleClicked

PBDataWindow_DoubleClicked (postback)

DoubleClicked is handled

RButtonDown

PBDataWindow_RButtonDown (postback)

RButtonDown is handled

ButtonClicked

PBDataWindow_ButtonClicked (postback)

ButtonClicked is handled and/or ButtonClicking is handled

ButtonClicking

PBDataWindow_ButtonClicking (postback)

ButtonClicked is handled and/or ButtonClicking is handled

ItemFocusChanged

PBDataWindow_ItemFocusChanged (postback)

ItemFocusChanged is handled

PBDataWindow_ItemFocusChanged_AND_ItemChanged_OR_ItemError (postback)

ItemChanged and ItemError are handled, but ItemFocusChanged is not

PBDataWindow_ItemFocusChanged_AND_ItemChanged (postback)

ItemChanged is handled, but ItemFocusChanged and ItemError are not

PBDataWindow_ItemFocusChanged_AND_ItemError (postback)

ItemError is handled, but ItemChanged and ItemFocusChanged are not

ItemError

PBDataWindow_ItemError (no postback)

ItemChanged is handled and/or ItemError is handled

ItemChanged

PBDataWindow_ItemChangedReject (no postback)

ItemChanged is handled

RowFocusChanged

PBDataWindow_RowFocusChanged (postback)

RowFocusChanging is handled, but ItemFocusChanged is not

RowFocusChanged is handled, but ItemFocusChanged is not