RecordSet.removeItemAt( ) Method | Flash 6 |
removes a record from a recordset |
The index number of the record to be deleted.
The removeItemAt( ) method deletes a row in a RecordSet object. The internal identifier of the row is removed and not used again, and the length of the RecordSet object is reduced by one.
The following code adds two records to the recordset, then deletes the first record (the record in the 0 position):
#include "RecordSet.as" var myRecordset_rs = new RecordSet(["First", "Last", "Email"]); myRecordset_rs.addItem({First:"Tom", Last:"Muck", Email:"tom@tom-muck.com"}); myRecordset_rs.addItem({First:"Jack", Last:"Splat", Email:"jack@tom-muck.com"}); myRecordset_rs.removeItemAt(0); trace(myRecordset_rs.getLength( ));
In this case, the Output window displays "1" because one row has been deleted.
RecordSet.addItemAt( ), RecordSet.getItem`At( ), RecordSet.getLength( ), RecordSet.getRemoveAll( ), RecordSet.replaceItemAt( )