onBeforeAddRows Event
Arguments
- dataObject Array
An array of rows that were added.
- infoobject
An object that contains information about the event. The object can have the following properties:
- typestring
Indicates the event type. The event can be 'append' or 'insert'.
- indexnumber
If info.type is an 'insert', then info.index contains the index at which the data will be inserted.
Description
Fires when the .addRows() method is called before the rows are actually added.
Discussion
The onBeforeAddRows event can be used to cancel adding a row to the List control. If the event returns false, the action is not performed. For example:
Example
if (info.type == 'append') { alert("Appending new rows is not allowed."); return false; }
See Also