RecordSet.removeItemAt( )


RecordSet.removeItemAt( ) Method Flash 6

removes a record from a recordset
   myRecordSet   .removeItemAt(   index   ) 

Arguments

index

The index number of the record to be deleted.

Description

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.

Example

The following code adds two records to the recordset, then deletes the first record (the record in the 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.

See Also

RecordSet.addItemAt( ) , RecordSet.getItem`At( ), RecordSet.getLength( ) , RecordSet.getRemoveAll( ) , RecordSet.replaceItemAt( )



Flash Remoting
Flash Remoting: The Definitive Guide
ISBN: 059600401X
EAN: 2147483647
Year: 2003
Pages: 239
Authors: Tom Muck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net