The Web Forms version of the DataWindow is a subclass of the DataWindow .NET™ Web DataWindow control. The client-side programming capabilities of the Web DataWindow enable the use of client-side JavaScript event handlers.
The ClientEvent properties of the Web DataWindow have also been exposed, allowing the creation of customized event handlers that can override the default event handlers in the PBDataWindow.js file. The names of the ClientEvent properties consist of the name of a client-side event with an “OnClient” prefix. For example, the ClientEvent property that corresponds to the Clicked event would be OnClientClicked. You can circumvent the default event handler for the Clicked event by setting OnClientClicked to the name of a JavaScript function that uses the client-side Clicked event arguments.
Event | Arguments | Return Codes |
---|---|---|
ButtonClicked | sender, rowNumber, buttonName | 0 – Continue processing |
ButtonClicking | sender, rowNumber, buttonName |
|
Clicked | sender, rowNumber, objectName |
|
DoubleClicked | sender, rowNumber, objectName |
|
ItemChanged | sender, rowNumber, columnName, newValue |
|
ItemError | sender, rowNumber, columnName, newValue |
|
ItemFocusChanged | sender, rowNumber, columnName | 0 – Continue processing |
RButtonDown | sender, rowNumber, objectName |
|
RowFocusChanged | sender, newRowNumber | 0 – Continue processing |
RowFocusChanging | sender, currentRowNumber, newRowNumber |
|
The signatures of the client-side events and the effects of their return values are the same as for the Web DataWindow control in DataWindow .NET. For a description of each event, see Alphabetical Liist of Web DataWindow Client-Side Events.
In client events, you can use a return statement as the last statement in the event script. The datatype of the value is number.
if (newValue = "") { return 2; }
function dwCustomer_RowFocusChanging(sender, currentRowNumber, newRowNumber) { if (newRowNumber < currentRowNumber) { return 1; } }
function dwCustomer_Clicked(sender, rowNumber, objectName) { alert ("You clicked the " + objectName + " column in row " + rowNumber) }