Skip to main content
Version: 11.2

postdelete

note

This article is about the postdelete UDB event handler.

postdelete

The postdelete event may be called from web pages developed in Web Designer and processed by a USoft page engine service.

EventApplies toOccurs when
postdeleteData source objects (UdbDataSource) of Table typeImmediately after a row is removed from the data source's in-memory row set

This event is triggered internally by the UdbRowSet class, from its delete() method, right after the row has been spliced out of the row set's in-memory row collection. It only fires for data sources of Table type.

This is a lower-level, more immediate notification than the rowpostdelete event: postdelete occurs as soon as the row disappears from the row set, without waiting for the rest of the delete processing (such as reselecting a row) to complete.

Purpose

You can use this event to react as soon as a row has actually been removed from a data source's in-memory data, for example to update client-side bookkeeping that tracks the rows currently held by the data source.

How to use

Find or create an Event Listener object with Event Type = postdelete. Event Listeners are in the Web Designer Controls catalog:

Insert the event listener into the data source object. Insert a callClientScript action into the event listener. Use this action's Script property to code the behaviour that you want to see when the event occurs.

You are implicitly associating the event with an event handler function. This function has an options parameter. For available options, see the Options section at the end of this help topic:

function(*event*, *options*){ ... }

Or you can create the event handler more explicitly by calling $.udb('data-source').on().

Options

When the event occurs, the following event handler function is called. You can use this function's options parameter in your event scripting.

function( *event*, *options* )

*event* ::= jQuery.Event
*options* ::= *event-options*

*event-options* ::= {
row: *row*
}

Event contains the run-time details of the triggered event, of the event type stated above.

This syntax means that you can access an option by scripting

options.*option*

Row is the UdbRecord object that was just removed from the row set's in-memory row collection.