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.
This table describes the logic followed by the default handlers that attach to each event, and indicates whether the handler causes a postback, a delayed postback, or no postback.
Client-side Event | Default JavaScript handler (postback action) | Used under the following conditions for server-side events: |
---|---|---|
Clicked | PBDataWindow_Clicked (postback) |
|
PBDataWindow_DelayedClicked (delayed postback) |
|
|
PBDataWindow_ClickedDifferentRow (postback) |
|
|
PBDataWindow_DelayedClickedDifferentRow (delayed postback) |
|
|
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) |
|
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 Liist of Web DataWindow Client-Side Events.